0

I am using a Process Builder associated with a Visual flow. Can anyone could shed some light on how bulkification works for those? Right now the flow receives a record Id then do 2 Record Lookups + 1 Fast Lookup and 2 DML operation. Based on what I found (see link below) I should not run into any issue, but when I test it I can see that for each record I insert the flow will do 3 SOQL queries but regardless of the number of record it will do 2 DML operations.

https://developer.salesforce.com/docs/atlas.en-us.salesforce_vpm_guide.meta/salesforce_vpm_guide/vpm_admin_bulkification_how.htm

And here is a screenshot of the Process Builder & Flow:

Process Builder

Visual Flow

bumped to the homepage by Community yesterday

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

  • Visualflow or Process builder does not support bulkification completely. However, it doesn't run into errors easily but eats resources. Process builder must be used where less number of records need to be processed. – Ashwani Mar 22 '17 at 17:59
0

Use Fast elements instead of using Record element. Few things also depend on your Flow and Process design might be possible there are some chances to optimize it. Could you post your Flow and Process design here?

  • Just updated the post with pictures. Thanks – MaxPaq Mar 22 '17 at 18:57
  • It look's good to me. How about testing Flow and Process with 200 records via data loader? I think it should work without any error – J Doe Mar 22 '17 at 20:13
  • Already did, I get 1 query per lookup per record (so 2 queries per record), so I can't insert more than 50 records at a time. – MaxPaq Mar 22 '17 at 20:57
  • It should take only 2 SOQL and 2 DML for 200 records. Make sure to set batch size 200 in data Loader – J Doe Mar 22 '17 at 21:20
  • Hi @JDoe . Are we saying that Salesforce 'automatically' bulkifies queries and DML's? – Kanav Khurana Sep 19 '18 at 13:06

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.