A Salesforce administrator is troubleshooting an automated Lead ingestion process from an external web form. The Lead object has several automation features configured: custom Validation Rules, a Before-Save Record-Triggered Flow that populates missing field values, standard Lead Assignment Rules, and an After-Save Record-Triggered Flow that sends an outbound notification. Which sequence accurately describes the order in which Salesforce executes these features during the record save operation?
- Before-Save Record-Triggered Flow → Custom Validation Rules → Lead Assignment Rules → After-Save Record-Triggered FlowAnswer
- BCustom Validation Rules → Before-Save Record-Triggered Flow → Lead Assignment Rules → After-Save Record-Triggered Flow
- CBefore-Save Record-Triggered Flow → Lead Assignment Rules → Custom Validation Rules → After-Save Record-Triggered Flow
- DCustom Validation Rules → Lead Assignment Rules → Before-Save Record-Triggered Flow → After-Save Record-Triggered Flow
Answer
The correct sequence is: Before-Save Record-Triggered Flow, followed by Custom Validation Rules, then Lead Assignment Rules, and finally After-Save Record-Triggered Flow.
In the Salesforce transaction order of execution, high-level automation steps execute in a strict sequence: (1) System validations pass, (2) Before-Save Record-Triggered Flows execute to modify record values in memory, (3) Custom Validation Rules evaluate the updated field values, (4) The record is saved to the database (uncommitted), (5) Apex after-triggers and Lead Assignment Rules execute to reassign ownership, and (6) After-Save Record-Triggered Flows execute near the end of the transaction before final commit.
Step-by-Step Solution
Key Concept
Salesforce Architecture Order of Execution Sequence
Estimated Time:2m 0s