Creating or updating a record can trigger a record-triggered flow to make additional
updates to that record before it's saved to the database. A record-triggered flow can update a
Salesforce record 10 times faster than a record-change process. Configure the record trigger in
the Start element of your record-triggered flow.
Perhaps you’re familiar with Process Builder and using a record-change process to make
additional updates to each record that triggers the process. Before-save updates in flows
accomplish that same goal, but much more quickly because each record doesn’t get saved to the
database again. Avoiding that extra save procedure means skipping another round of assignment
rules, auto-response rules, workflow rules, and other customizations that take time to
execute.
Perhaps you’re familiar with Apex triggers. A flow that makes before-save updates is similar to
a before trigger. The previously described record-change
process is similar to an after trigger. In a save
procedure, before-save updates in flows are executed immediately before Apex before triggers.
Because of their speed, we recommend that you use before-save updates in flows to update fields
on new or changed records. However, sometimes you must use a record-change process or an Apex
after trigger to:
Access field values that are set only after the record is saved, such as the Last Modified
Date field or the ID of the new record.
Create or update related records.
Perform actions other than updating the record that launches the flow.
Flows that make before-save updates are typically simpler to build than other types of
flows.
The $Record global variable contains the values from the
record that triggers the flow to run. As a result, there’s no need to add a Get Records element
to obtain the record data nor create flow variables to store the record data.
When the flow changes the values in the $Record global
variable, Salesforce automatically applies those new values to the record. So there’s no need to
add an Update Records element to save the new values to the database.
Only these elements are supported: Assignment, Decision,
Get Records, and Loop. These elements let you obtain data from other Salesforce records, and use them to decide
whether to update the triggering record’s fields and to what values.
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.