mass update issue in banzai - " box:too many SOQL queries: 101"

  • 1
  • Problem
  • Updated 3 years ago
  • Not a Problem
I am trying us use mass update to update a single field across 50 records. It returns the error "box: Too Many SOQL queries:101. I never got this error before upgrading to Banzai. Any Ideas?
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
I found this. Any ideas of a work around?

System.LimitException: Too many SOQL queries: 101
Knowledge Article Number 000181404
Description
The "System.LimitException: Too many SOQL queries: 101" error appears when you've hit the Execution Governors limit, which means you can run a total 100 SOQL queries in a context. All the triggers fired will be counted in a single context or call. To fix the issue, you'll need to change your code in such a way that SOQL fired is less than 100. If you need to change the context then you can use @future annotation which will run the code asynchronously.
https://help.salesforce.com/apex/HTVi...
Photo of J.

J., Official Rep

  • 7,470 Points 5k badge 2x thumb
Raymond,

Do you have a managed package with a namespace of "box" installed in that org? Does that package contain any Triggers/Workflow Rules on the object that you are trying to update? It may still be a problem in Banzai, but it could also be an issue with that managed packages code not being bulkified.
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
Interesting... I didn't make the connection but I do have a box.com installed package. It works on the object I'm modifying in bulk, so there is probably a connection there. I'm not sure how to test it other than to uninstall the box package which is not a very good option. Thanks for your help!
Photo of Zach McElrath

Zach McElrath, Employee

  • 48,984 Points 20k badge 2x thumb
You will probably need to file a support case with box.com to ask them to examine their trigger code on this object --- if the trigger is throwing an error when editing 50 records via Skuid, then it will probably throw that same error when trying to mass update them via custom Apex code or Data Loader. Box's package should get its own set of SOQL queries but apparently they're not optimizing their trigger code to handle updates to large numbers of records concurrently. 
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
Thanks. I filed a support case with Box.