ISCHANGED and PRIORVALUE in Before Save Flows (not for after save flows)

UPDATE - DEC 2020 : Spring21 should offer this natively, per poking in my pre-release org. Will link to release notes when they are available.

Before save flows do not directly offer functions like ISCHANGED, ISNEW, and PRIORVALUE

ISNEW can be handled by checking if $ is null (h/t to Jen Lee)

To handle ISCHANGED or PRIORVALUE, use a get records element to get the current record, which gives you the values from before your auto-launched-before-save-flow updates it.

To do this, select your object, and filter for id = $
make sure to only store the first record, you dont need a collection here!


Now you can check if it was changed in a decision element by comparing the new value ($record.yourField) with the prior value (getRecord.yourField)

in my case i wanted to check if it was equal to a certain value, and changed, so i went with a decision like this


to just test if a field is changed, create a boolean formula like this


and evaluate if its TRUE in a decision element


was glad to figure this out today so i didnt need to setup a dozen or so field updates - just a simple assignment element or two (to keep it clean)!

the flow

a gif of the magic in action. this before save flow blanks out all the bank info fields when status = Graduated. Go GDPR! In my case its not all that critical to avoid firing again if status remains graduated, but i did not want that behavior, so here we go…



the same approach appeared to work in after save flows. but i was actually using a before save flow…so…yeah. late night tests dont always work out as planned.


Now read this

Determining which fields are used in a page layout (in less time than it takes to brew a cup of coffee)

There is a great app called FieldTrip that will let you know which fields are actually populated in records, but deep diving into eclipse, or using brute force, have been the only way that I am aware of to see which ones are actually... Continue →