function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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 (

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 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:

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) (

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.