What is the order in which the approval process and triggers execute?
I have a trigger on a custom object and there is an update when the user submits the record for approval. Will the DML update happen first and then go to the initial Steps or do they happen in parallel?
So, will it be:
1. Submit for Approval --> Trigger updates complete --> Initial steps for approval follow
(OR)
2. Submit for Approval --> Trigger updates the record + Enters the inital steps for approval?
In my case I have some user lookups on my custom object that I fill from another related object. If the first happens then I can let the trigger handle the update and then let approval process send email to the updated users else I need to halt the approval so that my trigger works first and then the approval starts to send an email out ( I am not sure if I can halt the approval till the trigger completes)
Can someone point me to what the official docs say?