Order of execution in Salesforce

In This Post i will let you know the order of execution in salesforce.

Order of execution in Salesforce

  1. The original record is loaded from the database
  2. System Validation Rules.
  3. Executes all before triggers.
  4. Custom Validation rules.
  5. Executes all after triggers.
  6. Executes assignment rules.
  7. Executes auto-response rules.
  8. Executes workflow rules.
  9. If there are workflow field updates, updates the record again.
  10. If the record was updated with workflow field updates, fires before and after triggers one more time. Custom validation rules are not run again.
  11. Executes escalation rules.
  12. If the record contains a roll-up summary field or is part of a cross-object workflow, performs calculations and updates the roll-up summary field in the parent record. Parent record goes through save procedure.
  13. If the parent record is updated, and a grand-parent record contains a roll-up summary field or is part of a cross-object workflow, performs calculations and updates the roll-up summary field in the parent record. Grand-parent record goes through save procedure.
  14. Executes Criteria Based Sharing evaluation.
  15. Commits all DML operations to the database.
  16. Executes post-commit logic. Ex: Sending email

 

Hits: 229

Share Post

You may also like...

Leave a Reply

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