Before-save versus after-save record-triggered Flow timing
Key Takeaway
Use a before-save flow to update or validate the triggering record. Use an after-save flow for anything beyond that, including anything that needs the record ID.
A record-triggered flow runs automatically when a record is created, updated, or deleted. You choose whether it runs before or after Salesforce saves that record. A before-save flow is fast, but it can only change or validate the triggering record. An after-save flow runs after the record has an ID, so it can create or update other records, send email, and call subflows.
When a record-triggered flow runs
A record-triggered flow runs in the background every time a matching record changes. The change can come from the Salesforce interface, a spreadsheet import, or an API integration.
In the flow's Start element, you set the trigger and choose when in the save the flow runs. You have two choices: before the save or after the save.
| Before-save flow | After-save flow | |
|---|---|---|
| Also called | "Fast Field Updates" | "Actions and Related Records" |
| When it runs | Right when someone clicks Save, before Salesforce writes the record to the database | During the same record update, after Salesforce saves the record and gives it a record ID |
| Use it to | Update fields on the triggering record, or validate the record | Do anything beyond updating or checking the triggering record, such as create or update related or unrelated records, send email, or call subflows |