3

This might seem to be a fairly simple question but I cannot find documentation which clearly states this. I have doubts about these questions-

  1. Do workflow/process builder actions such as field updates count against the DML limits?
  2. When workflow(or any other automation tool) selects the records based on filter criteria, does it count against the SOQL limits?
  3. If the DML statements are used, is the operation bulkified in case of workflows? I know that transction is bulkified in process builders, but not sure about workflows.
  4. What would happen when governor limits are exceeded and allorNone argument is set to false in Database.update method? Will the complete transaction be rolled back regardless of the value passed in the argument or will it succeed partially even if governor limits are exceeded?
  5. I know that most governor limits are counted on per transaction basis. I am still wondering if there is any per day limit on SOQL/DML statements.

If there is any documentation regarding the same, please share the link in the comments section and we can close this question. I did my fair research before resorting to this portal to ask this simple question.

Thanks much.

1
  • 1
    This seems like something you can test on your own. Create a new dev sandbox, modify a record, check the debug logs, create a workflow, modify the same record, check the debug logs. – gNerb Jan 15 '20 at 17:06
1
  1. Yes
  2. Depends - if it's a process builder operating on the update/creation of an object then the objects already exist and filtering is similar to how you'd do it in an apex trigger context. If you're doing a Get Record component in flow then it'd be a query.
  3. I believe yes although I can't find any documentation that outright says it. Note that workflow field updates fires before update and after update triggers one more time which is why you can confirm it's simply re-triggering the same batch of records again into the trigger.
  4. If you hit your limits then you hit your limits. It won't continue to finish - don't confuse it continuing to finish due to record operation failure (hitting a validation rule) and hitting your limits. You can typically use the Limits class to check before performing operations as well.
  5. Per transaction - no daily limit in regards to SOQL or DML. Note that email and Time-based workflow actions do have limits that are time-based.

Deeper dive on the answers above:

It's stated in the Process Limits Documentation that flow actions count when you expect them to (queries and updates). If you think about it, PB is just really executing apex in the back-end with an easier to use UI.

enter image description here

Looking then at the Triggers and Order of Execution Doc, it covers all the various automation you mention that will count towards this.

Flows even have their own documentation concerning worrying about the limits they may hit in their Per-Transaction Flow Limits Doc and an article on Flow Bulkification in Transactions

enter image description here

enter image description here

Workflow rules, I believe, are bulkified in that they execute the workflow rules on the batch of records.

All documentation related to limits concern per-transaction (emails do have daily limits)

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.