I have some very simple automation in place for demoing Salesforce "Order of Execution". I have a field on called Version__c which increments by 1 in a trigger and a workflow. This is what happens:
- Before update trigger fires, Version__c increases to 1
- Workflow w/ field update fires, Version__c increases to 2
- Before update trigger fires again, Version__c increases to 3
I'm hoping to add more even more automation to this (process builder) and have our team easily track these types of changes when something unexpected in our org occurs.
The best visualization tool that I could come up with was in the Developer Console.
Debug > Perspective Manager > change to All (Predefined) > Click Save Order or Timeline tab
Are there any other tips/tricks that I could share to our non technical team members to help investigate these types of scenarios? I'll be honest, I even find Salesforce's developer console a bit verbose and intimidating at times...
****Update - I added a process builder (with Recursion unchecked), which increments the Version even more.****
My debug in the trigger appears hit 3 times in the logs. But the output is now 5? Now I'm even confused as to what is happening behind the scenes...
- Process Builder runs, updates the Version__c to 4?
- Trigger runs again, updates the Version__c to 5?