Flow Trigger — Use of Record Prior Values

In this blog we are going to see how do we use the $Record__Prior (Spring ’21) in a record triggered flow.

We will take a use-case to add case reopened date/time when case status moves from “Closed” to any other status.

Step 1: Create a before update flow on the case object and add the condition that the current status is not “Closed”

Before Update Trigger
Select object as Case and Check on Status is not currently Closed

Step 2: Create a “Decision Element” in the flow to make use of $Record__Prior to check the Prior Case Status is Closed.

Use of $Record__Prior

Step 3: If the Decision Element is true for “Case Prior Closed” use “Assignment Element” and set the case reopened date(custom field) as current date/time.

Set $Record Reopened Date/Time

The complete flow looks like below

Flow using $Record__Prior


Useful Resources

Please provide any comments or feedback.