Pages

Monday, January 21, 2019

Order of Execution - Flow chart

Motivation behind this


Few Salesforce aspirants are learning Salesforce from me and are struggling to remember and visualize the order of execution which starts with a DML operation and there are involvements of triggers, different types of out-of-box automations like process builder, workflows, flows and different rules.

I have prepared this flow chart which could be easy to understand and remember taking reference from Triggers and Order of Execution

Flow of execution



Note

I have shown the field update from workflow, it could be possible that field update can be done from Process Builder or Flow. It will also fire Before update and after update triggers.

So, we should design our system in such a way that, recursion should be eliminated. Otherwise due to recursion there will be unpredictable outcome or duplicate actions could be possible.

It is advisable that, if we have trigger on the object then not to update any field of that object through workflow or process or flows. Those updates need to be handled through trigger itself.