1

I know this was asked multiple times with variable context. I have gone through the SF documentation regarding Process Builder & Workflow limits & different use cases but I'm still unable to make a decision to migrate Workflows to Processbuilder as Process builder doesn't go well with triggers.

My Use Case: I have a trigger on Opportunity which handles complex business logic. There are few active Opportunity workflow rules with field updates/emails & active process builder which also has field updates. The criteria used for workflow & Process builder are different.

I'm trying to optimize different WFs & migrate them into a Single process builder with multiple criteria & criteria specific actions which include record updates.

As I have multiple criteria where each criteria has its own actions that perform field updates. How will this impact the governor limits. Does each criteria specific update consumes 1 dml & 1 Soql?

Example: I'm combining all the workflows into single process as shown below.

-One PB_Process per Opportunity
   Criteria 1 --> Action(Update Opp record)
   Criteria 2 ---> Action(Update Opp Record)
   Criteria 3 ----> Action(Update 3 Opp Record)
   Criteria 4 ----> Action(Email Notification)

As per the order of execution and per transaction limits, does Process builder hit more limits than all workflows combined. Like what would be the dml & SOQL count in both cases.

0

As I have multiple criteria where each criteria has its own actions that perform field updates. How will this impact the governor limits. Does each criteria specific update consumes 1 dml & 1 Soql?

Refer the Process Limits where it clearly states

Each Create a Record action uses one DML statement. Each Quick Action action uses one DML statement. Each Update Records action uses one SOQL query and one DML statement. Each Flows action can use multiple SOQL queries and DML statements, depending on the elements that the flow executes.

Here the criteria which satisfies that consumes the limit, not all the criteria which has been defined.

Also, if you have trigger on Opportunity then don't use process or workflow field update for that Opportunity object. Handle those field update through trigger to avoid recursion.

  • Thanks for the response Santanu! I do currently handle the recursion on my trigger. But my confusion lies in, if i were to use either process builder or workflow along with the trigger in the above use case, do you think going with workflow would be my best bet? As workflow update doesnt use SOQL unlike process builder which consumes dml +soql. – SMorse Mar 21 at 7:34
  • @SMorse, my question would be whether you could legitimately add the flow/PB logic into your trigger, since you already have one, or does this need to be separately available for admin change/enablement? – Phil W Mar 21 at 7:59
  • @SMorse, I will transfer the logic of workflow rule or process into trigger. – Santanu Boral Mar 21 at 8:42
  • @PhilW - it needs to be separately available for admin to change/enable. – SMorse Mar 21 at 13:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.