Order of execution of trigger, workflow etc. – Salesforce

1) Loads the original record from the database or initializes the record for an upsert statement.
2) Loads the new record field values from the request and overwrites the old values.
3) Executes all before triggers.
4) Runs most of the system validation
5) Executes duplicate rules
6) Saves the record to the database, but doesn’t commit yet.
7) Executes all after triggers
8) Executes assignment rules.
9) Executes auto-response rules.
10) Executes workflow rules, If the record was updated with workflow field updates, fires before update triggers and after update triggers one more time
11) Executes escalation rules.
12) Executes entitlement rules.
13) Roll-up summary field calculations
14) Executes Criteria Based Sharing evaluation.
15) Commits all DML operations to the database.
16) Executes post-commit logic, such as sending email.

Gopal Das
Follow me

Leave a Reply

Your email address will not be published. Required fields are marked *