function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Deanna Aaron 11Deanna Aaron 11 

Field update is clearing a field value?

I have a formula field called "Email Fail Status'. If this field contains a value, then I want to update a picklist field titled, "Email Approval" to say 'No'.

The field value for "Email Approval" should be 'No' IF the formula field "Email Fail Status" is not blank.

I created a workflow rule using - 'Run the field if the criteria are met'
Email Fail Status not equal to _____ (I didn't select anything because it should be blank)
The field update says, Update Email Approval field to 'No'.
The result: It works, but clears out the value in my formula field. Is there another way I should do this?

Thank you.
Best Answer chosen by Deanna Aaron 11
Akshay_DhimanAkshay_Dhiman
Hi Deanna,

This cannot be possible that on workflow , formula field value gets blank . If it's happening then please check following things :
  • If there is another workflow rule executing on the same field.
  • If there is any trigger getting fired on the object.
  • If there is any process builder running .
Below is a code for the same . I have tried in my Dev org its working fine .

User-added image


Please make sure you have selected 3 option

User-added image

Regards,
Akshay

All Answers

Arpit Jain7Arpit Jain7
Danna,

Workflow doesn't fire on formula fields. What you can do as an workaround is "Replicate the formula in your workflow rule and fire it every time a record is created or edited."

Also related to value getting clear in formula field, it should be something due to your formula. Field used in formula field might be updated in backend which is resulting in blank formaula field.

Thanks
Arpit
 
Akshay_DhimanAkshay_Dhiman
Hi Deanna,

This cannot be possible that on workflow , formula field value gets blank . If it's happening then please check following things :
  • If there is another workflow rule executing on the same field.
  • If there is any trigger getting fired on the object.
  • If there is any process builder running .
Below is a code for the same . I have tried in my Dev org its working fine .

User-added image


Please make sure you have selected 3 option

User-added image

Regards,
Akshay
This was selected as the best answer
Akshay_DhimanAkshay_Dhiman
Thank you Deanna for selecting my answer as best. It's my pleasure to help you.