In this blog you will learn to get Prior Value of a formula field in Salesforce. So in today's example we will be getting prior value of a formula field on Account.Please follow below steps :
1. Create a custom field to store the prior value
2. Create a New Workflow with criteria of Created and every time it's edited. Run the rule if formula evaluates to true.
Add the formula ISCHANGED(Your Formula Field)
3. Select the field update action and update the custom field value using the priorvalue(Your Formula Field) as shown below -
4. Activate the workflow.
That is the trick and you are good to go :)
Output
If you have any question please leave a comment below.
If you would like to add something to this post please leave a comment below.
Share this blog with your friends if you find it helpful somehow !
Thanks
Keep Coding
4 Comments
Thank you! That was great.
ReplyDeleteHow can I do this with flow?
ReplyDeleteSharing a link for reference
Deletehttps://help.salesforce.com/s/articleView?id=release-notes.rn_forcecom_flow_fbuilder_prior_values_flow.htm&type=5&release=230
Thank you for the quick reply. I need to use automation to put the "previous value" of your picklist in each time it is changed. Then when your approval is rejected use your automation to grab your previous value field and set your picklist value with you. Do you have a reference to something simpler with the steps? I'm new to flows.
Delete