+ Start a Discussion

order of execution of process builder, trigger which one runs first?

If I have define a flow in process builder which runs after the record is created then which one runs first ?Trigger or Proces builder?
Gaurav KheterpalGaurav Kheterpal
This is explained here (https://help.salesforce.com/apex/HTViewHelpDoc?id=workflow_flow_action_considerations.htm&language=en_US).

When flows are launched from workflow rules that are triggered by bulk loads or imports, the flows’ data manipulation language (DML) operations are executed in bulk to reduce the number of calls required and to optimize system performance. The execution of any of the following flow elements qualifies as a DML operation: Record Create, Record Update, Record Delete, Fast Create, Fast Update, or Fast Delete. For example, suppose that you use Data Loader or the Bulk API to update 50 records, and those updates meet the criteria of a workflow rule with a flow trigger action.

If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others and improve the overall quality of Discussion Forums.

Gaurav Kheterpal
Certified Force.com Developer| Salesforce Mobile Evangelist| Developer Forums Moderator| Dreamforce Speaker

Robbie Lloyd Ko 5Robbie Lloyd Ko 5
This has a clearer explanation of the order of execution of Triggers -> Workflows - > Process Builder.   Please see link: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm

Naresh Kumar SainiNaresh Kumar Saini
First Trigger will run then Process Builder.
suryansh guptasuryansh gupta
sales force 203sales force 203
From this link Flow Trigger Considerations (Pilot) (https://help.salesforce.com/articleView?id=workflow_flow_action_considerations.htm&type=5)

In a transaction, flow triggers are executed after all workflow field updates, including any Apex triggers and standard validations that are executed as a result of those workflow field updates. After executing flow triggers, the system executes escalation rules.