Qus: What is the order of execution in salesforce?
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
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.
In case of Workflow Rule Field updates again before triggers and after triggers fire one more time
System validation rules for duplicate check
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)