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
arnieparniep 

Process flow for account object to update custom field with old value for a trigger alert

We want to use an account object custom field for an email trigger alert based on the old value of the field.  We ran a report and see the old and new value using the account history report but we are unable to produce the old value for our custom field named 'lifecycle prior value.'  SF support directed us to the forum for help from SF developers.  We appreciate any help!
Akhil AnilAkhil Anil
You need to setup the history tracking for the appropriate field. The field will not show up in the history tracking is not enabled for the appropriate field. 

Go to Setup > Account > Fields > Set History Tracking > Here check the field which you want to see in the history report.

That should work !

Kindly mark it as an answer if that works !
arnieparniep
Thanks we are doing that now.  We want to put th old value into a custom field so we can create a email trigger workflow but the field is not visibile in the flow field list.
Akhil AnilAkhil Anil
Hi Arneip,

If you want to use the old value in a workflow why not simply use the PRIORVALUE()  like this ?

PRIORVALUE(lifecycle__c)
arnieparniep

Hi Akhil Anil,  Thanks!  I tried that but I received this error:

Error: Function PRIORVALUE may not be used in this type of formula

Steps:

1) created a custom field named Lifecycle Prior Value, formula, text
2) inserted PRIORVALUE(lifecycle_status_c) in formula field
3) checked syntax
4) result: Error: Function PRIORVALUE may not be used in this type of formula

This is why I was trying to use a flow instead of a formula field. SF support says old and new values are accessible via a flow but since I'm using a picklist I'm not sure if this is the problem?

-A

 

{tushar-sharma}{tushar-sharma}
After Spring 21 release we can now get Old values in Salesforce Flow. Check my post in which I have covered step by step how we can do this.

https://newstechnologystuff.com/2020/12/20/get-old-values-in-record-triggered-flow/