Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Trigger a Flow That Performs Actions After a Record Is Saved

Creating or updating a record can now trigger a flow that performs actions such as sending an email after the changes are saved to the database. Use record-changed flows to perform after-save actions and make before-save updates. You can replace most of your workflows and record-change processes that you created in Process Builder.

Where: This change applies to Lightning Experience and Salesforce Classic in Essentials, Professional, Enterprise, Performance, Unlimited, and Developer editions.

Who: To activate a flow that performs after-save actions, you need the View All Data permission.

Why: Perhaps you’re familiar with Process Builder and using a record-change process to send an email. Such a process can send an email automatically for each new account. After-save actions in flows accomplish that same goal, and you don’t have to use a different tool.

Or perhaps you’re familiar with Apex triggers. A flow that performs after-save actions is similar to an after trigger and can:

  • 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.

With Flow Builder, you can also do more such as get records and loops.

How: Create a record-changed flow. For Run the Flow, select After the record is saved.

Configure Trigger window

For a record-changed flow that performs after-save actions, the Flow Builder Toolbox offers the same elements as an autolaunched flow that has no trigger.

Flow Builder Toolbox and canvas

In the flow, the $Record global variable contains the Salesforce record that launches the flow. To create or update any records, you must use the Create Records element or Update Records element. That’s different from autolaunched flows that make before-save updates because those flows automatically save changes to the record that triggers the flow.