Qus:    What is the order of execution in salesforce?
Aug 18, 2021 04:44 1 Answers Views: 481 SHIVA
Prev Next
Answers (1)
DILEEP Aug 19, 2021 06:20
Answer:   We are creating validation rules, workflow rules, assignment rules, auto-responsive rules, escalation rules and apex triggers etc..
If the condition is same for all the rules which will execute first and which will execute next, for this salesforce provide the order.
Order of execution in sales force

Prepare the record for insert/update operation.

It will replace all the old field values with new field values.

If the request is coming form UI all the system validations will execute –

PageLayout level validations
Before triggers
Custom Validations and again system validation rules will fire (Page Layout level validations won’t fire at this point of time)

Record will be saved into the database but doesn’t not commit.

After triggers
Assignment rules
Auto-responsive rules
Workflow Rules
In case of Workflow Rule Field updates again before triggers and after triggers fire one more time

System validation rules for duplicate check
Escalation Rules
Rollup-Summary fields will be calculated
Grant parent Rollup-Summary fields will be calculated
Criteria base sharing evaluation
Record will be committed into the database
Post commits logic (Sending emails)

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.

Let`s Connect