Cert++
Close

After-commit emails and scheduled paths versus in-save automation

Key Takeaway

Timing decides what a record-triggered flow can do. When an email and a related record must happen right away as part of a save, use an after-save flow, because a before-save flow cannot send email or use the record ID, and a scheduled path delays the actions.

A record-triggered flow can act at different moments around a record save: before Salesforce writes the record, right after Salesforce saves it, or later in a separate transaction through the Run Asynchronously path or a scheduled path. The moment you pick decides what the automation can do, such as blocking the save, using the record ID, or sending email. The moment also decides what happens if the record changes, or the flow fails, before the work runs.

Before-save versus after-save

Record-triggered flows run automatically whenever a record is created, updated, or deleted, whether the change comes from the Salesforce UI, a spreadsheet import, or an API integration.

The first timing choice is whether the flow runs before or after Salesforce saves the record. A before-save flow is the "Fast Field Updates" option. An after-save flow is the "Actions and Related Records" option.

Before-save flow (Fast Field Updates)After-save flow (Actions and Related Records)
When it runsBefore Salesforce writes the record to the databaseAfter Salesforce saves the record
Record IDNot available yetAvailable, and used to create related records
Validate the record and block the saveYes, with an error before bad data is committedNo, the record saves when the flow runs
Create or update related and unrelated recordsNo, only the triggering recordYes
Send email or outbound messages, or call external systemsNoYes
Invocable Apex actionsNoYes

A before-save flow can use only the Assignment, Decision, Get Records, and Loop elements. An after-save flow can use system fields such as Created Date and Last Modified Date.

Platform Administrator II Study Guide

Checklist progress

0/290Learned

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other Platform Administrator II studiers.