2

I have a headless flow that runs when a new user is created*. It looks up the users email address via a record lookup/contact search. If no contacts exist with that email address a new contact is created. This works great for a single user however if I run the flow for all users in the system (approx 200) I get the too many SOQL query error. I can get around it by reducing the batch size on the data loader but I would rather not have to do this. From what I gather, this is because the process builder does not allow for bulk operations.

My question is will the update mentioned here solve this issue? In summary, the process builder will be able to cope with bulk operations. Or is it because my flow does not use fast lookup/updates? My understanding is that flow interviews will take care of bulkifying the flow but I'm not 100% on this.

Any clarification on the above would be a huge help as I have to build 2 more of these for different use cases.

Thanks

*Flow is triggered when a checkbox is marked as true. In order to avoid the mixed DML operation error relating setup and non setup object, a time based workflow rule is used to update the checkbox one hour after the user is created.

enter image description here

  • Please fix the title to describe the problem – Bart Juriewicz Sep 10 '15 at 11:16
  • Sorry I'm not following you, the title seems appropriate to me. What would you suggest? – Jay Sep 10 '15 at 11:19
  • "this issue" seems a bit mysterious to me. I would try something with 'too many SOQL query error'. Think of it as if you were trying to find the solution to similar problem - what would be your search phrase? – Bart Juriewicz Sep 10 '15 at 13:02
2

Doubtful, you should be able to resolve this issue before the update by switching to fast elements. The docs here explain the difference between the different types. This paragraph here helps identify why you are hitting the limits currently and will continue to hit the limits after the update:

Whereas each Record Update and Record Delete element uses one query and one DML statement, each Fast Update and Fast Delete element uses only one DML statement. With Fast elements, you can combine the results of multiple queries and perform a single DML statement against those results rather than performing a DML statement for every query.

  • That's excellent thanks for your help Jenny, much appreciated! – Jay Sep 10 '15 at 12:05

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.