What is the difference between before-save and after-save record-triggered flows, and when should you use each?
Suggested answer
Before-save record-triggered flows:
— Run in the same transaction as the record save, before it is committed to the database.
— Can update fields on the triggering record directly (using the $Record variable) without an additional Update Records DML statement.
— Faster performance: no extra DML transaction.
— Use for: field defaulting, field population based on logic, setting fields before save (equivalent to before-trigger field updates in Apex).
— Cannot create or update other records (no DML on other objects).
After-save record-triggered flows:
— Run after the record is committed to the database.
— Can query and update related records, create new records, send emails, call Apex, and interact with external systems.
— Shares the same governor limits as the triggering transaction (shared SOQL, DML limits with triggers and Apex in the same transaction).
— Use for: creating child records, updating parent records, sending notifications, Journey Builder entry events.
Practice content for interview preparation; not an official vendor answer. Verify details against current product documentation.
Community comments (0)
No comments yet.
Sign in or create a free account to add a comment. Comments are moderated before they appear.