Activity › Forums › Salesforce® Discussions › What is the order of execution in Salesforce?
-
What is the order of execution in Salesforce?
Posted by Anjali on September 28, 2020 at 7:23 AMWhat is the order of execution in Salesforce?
Shweta replied 5 years, 8 months ago 3 Members · 2 Replies -
2 Replies
-
Hi Anjali,
You can refer the link below :-
https://medium.com/@prasannajyothi/what-is-the-order-of-execution-in-salesforce-c273f9059f6c#:~:text=Here%20is%20an%20order%20of%20execution%20in%20salesforce&text=Executes%20all%20before%20triggers.,but%20doesn’t%20commit%20yet. - [adinserter block='9']
-
These are the Order of execution in Salesforce:
- The original record is loaded from the database.
- System Validation Rules.
- Executes all before triggers.
- Custom Validation rules.
- Executes duplicate rules.
- Saves the record to the database, but doesn’t commit yet.
- Executes all after triggers.
- Executes assignment rules.
- Executes auto-response rules.
- Executes workflow rules.
- If there are workflow field updates, updates the record again.
- If the record was updated with workflow field updates, fires before and after triggers one more time. Custom validation rules, duplicate rules, and escalation rules are not run again.
- Executes processes and flows launched via processes and flow trigger workflow actions.
- Executes escalation rules.
- Executes entitlement rules.
- If the record contains a roll-up summary field or is part of a cross-object workflow, perform calculations and updates the roll-up summary field in the parent record. The parent record goes through the save procedure.
- If the parent record is updated, and a grandparent 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 grandparent record. Grandparent record goes through the save procedure.
- Executes Criteria Based Sharing evaluation.
- Commits all DML operations to the database.
- Executes post-commit logic, such as sending an email.
Log In to reply.