Suggested answer

When a record is saved, Salesforce executes declarative and programmatic automation in this order:

1. System validation (required fields, field formats, max lengths)
2. Before Triggers (Apex)
3. Custom validation rules
4. Duplicate rules
5. Record written to database (not yet committed)
6. After Triggers (Apex)
7. Assignment rules (Leads/Cases)
8. Auto-response rules
9. Workflow rules (field updates re-fire triggers; email alerts, tasks, outbound messages do not re-fire triggers)
10. Processes (Process Builder — being retired)
11. Escalation rules
12. Roll-Up Summary fields recalculated on parent
13. Criteria-based sharing rules evaluated
14. Record-Triggered Flows (Before-Save executes before step 2; After-Save executes after step 6)
15. Commit to database
16. Post-commit: email sends, async jobs, Platform Events delivery

Note: Before-Save Flows execute between system validation and before triggers in recent releases — verify the exact position for the current API version.

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.

Plain text only, 3–2000 characters. A moderator reviews every comment before it is published.