Skip to main content
Solved

Bulkification of Flow Actions e.g. Create Folder For Record ID (createFolderForRecordId)

  • October 10, 2023
  • 3 replies
  • 379 views

agentgill

Is there a flow bulk pattern for creating Box Folders with default batch size of 200. When I insert 200 custom object records, I want 200 box folders created. Reducing batch size works, but not ideal.

In the debug logs I see multiple SOQL queries executed by the Box managed package for a single Folder create which ends up tripping the salesforce limits - An Apex error occurred: System.LimitException: box:Too many SOQL queries: 101

Best answer by smartoneinok Box

Hello 👋,

We don’t currently have a “bulk” pattern, but I can certainly pass this along to the team in charge of building out the flow templates. I imagine we would need to build in some batch logic so that the total queries doesn’t exceed the hard Salesforce SOQL limits.

Thanks,
Alex, Box Developer Advocate 🥑

3 replies

smartoneinok Box
Forum|alt.badge.img
  • Senior Developer Advocate
  • Answer
  • October 13, 2023

Hello 👋,

We don’t currently have a “bulk” pattern, but I can certainly pass this along to the team in charge of building out the flow templates. I imagine we would need to build in some batch logic so that the total queries doesn’t exceed the hard Salesforce SOQL limits.

Thanks,
Alex, Box Developer Advocate 🥑


  • Box Employee
  • October 16, 2023

Unfortunately this is a scaling issue with the core Box API. There is not a bulk folder create endpoint, so we’ll need to call one at a time from Salesforce. Setting the batch job appropriately is the solution here for now. Thanks!


agentgill
  • Author
  • Participating Frequently
  • October 17, 2023

thanks for responding