Posted in Salesforce

Order of Execution (Rules, Triggers etc.) in Salesforce

Order of Execution

1. Record is Created/Loaded.
2. Trigger.New is populated.
3. System Validations are executed.
4. Before Trigger runs.
5. Custom Validations are executed.
6. Record is Saved, not yet committed.
7. After Trigger runs.
8. Assignment/Auto Response Rule runs.
9. Workflow Rule are executed.
10.Escalation Rule runs.
11.Before/After trigger are executed.(based on step 9)
12.Record is committed to Database.
13. Roll up
14. Criteria Based Sharing Rule
15. Post commit logic is executed.