Refer to the Prior Values and Run Part of a Record-Triggered Flow

Refer to the Prior Values of the Record That Triggered Your Flow

Automation tools help us reduce the workload by automating the flows. Assume, we need to add some custom logic based on the prior values of a record but unfortunately, we do not have the prior value check in flows. Now, in Spring 21’ release salesforce, we can add $Record__Prior property to check the previous value of the record in update.


Let us consider if the opportunity Amount is increased by 50%, then we need to notify the Opportunity Owner. Before Spring 21’ release, we don’t have an option to implement in flows. But now we can achieve this in flow using $Record__Prior in record-triggered flow.

Things to consider
  1. The $Record__Prior variable holds the value for the record before the flow runs.
  2. $Record__Prior is available in the following flow location where we can read global variables value,
    1. Formulas
    1. Action input values
    1. Assignment values
    1. Decision outcomes
    1. Filters and individual field values when creating, updating, getting, or deleting records

Run Part of a Record-Triggered Flow After the Triggering Event

Scheduling actions in Salesforce can be done by Time Dependent workflow, Process builder and Auto launched flows. Auto launched flow invoked by an Apex class, Process or REST API. In Spring 21, we can schedule the record-triggered flow, as we schedule actions using workflow and Process builder based on the record value.


Let us consider a simple example; whenever an opportunity is created a follow up Task should be created and assigned to Opportunity Owner and a notification needs to be sent to Opportunity Owner 1 week prior to the Opportunity close date.

The above scenario can be done by workflow, Process builder. After Spring 21 release, we can implement this scenario using Record-Triggered flow.

Adding Time Schedules
Flow implemented to schedule the email Action and Create Task for an Opportunity
Things to Consider
  1. The scheduled actions are placed in the queue until the scheduled time to run.
  2. We can monitor the scheduled action in the Time-Based Workflow Monitor Setup page
Reference Link

About MST

At MST Solutions our cornerstone is to adapt, engage and create solutions which guarantee the success of our clients. The talent of our team and experiences in varied business verticals gives us an advantage over other competitors.

Recent Articles

Work with us.

Our people aren’t just employees, they are key to the success of our business. We recognize the strengths of each individual and allow them time and resources to further develop those skills, crafting a culture of leaders who are passionate about where they are going within our organization.