Order of Execution in Salesforce
Order of execution in salesforce is like an ABC in Salesforce World, make sure you should understand:-
- System Validation rule(required field, field format).
- Before Trigger are executed.
- Custom Validation rules are checked.
- After Triggers are executed.
- Assignment Rules are executed.
- Auto-Response rules are executed.
- Workflow Rules are executed.
- Before and After Trigger are executed one or more time if the workflow rule updates a field.
- Escalations Rules are executed.
- Parent Rollup Summary Formula or Cross Object Formula fields are updated in the respective objects.
- Criteria based Sharing rules are evaluated.
- Any Post-Commit Logic is executed.