function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
VintageHorizonVintageHorizon 

Data Loader Error (AssociateCaseToUser: System.LimitException: Too many SOQL queries: 101)

Hello,

 

Earlier today, I updated a lot of cases using the Apex Dataloader (Ver. 26.0).  Most of my 6k+ cases closed, but 600 of them failed and were given this error:

AssociateCaseToUser: System.LimitException: Too many SOQL queries: 101

 

Since I didn't write this code, I'm flummoxed as to what this means.  Any idea on what I can do with my data to make it process correctly?


Thanks Much.

 

Also--I realize there are posts similar to this one, but no one seemed to be asking about the error in reference to the Data Loader.  If this is a duplicate post, I apologize.

Vinita_SFDCVinita_SFDC

Hello,

 

This error can be related to the DataLoader Batch size setting. Try changing the Batch size to 10 and try the insert again. If you still see the error, try changing it again to 2 and attempt the insert again.

To change the Batch size setting, start the DataLoader, on the Welcome screen click Cancel, then click Settings on the DataLoader main screen. The top option is Batch size and the default is 200. You can change it as directed above.

 

Hope this helps!

vbsvbs
@VintageHorizon - There seems to be an issue with an Apex Trigger called "AssociateCaseToUser" on the Case object. This trigger may have code which has not been bulkified or in turn calls other Apex code which leads to multiple SOQL calls. A real fix would be to revisit this code and fix this rather than playing around with the batch size which is not the real problem....
Lee Anne GLee Anne G
Changing the data loader batch size to ten did the trick! Thank you so much!
Martin JohncoxMartin Johncox
Yes, changing the batch size to 10 also worked for me. I've never had this problem before but this was an easy fix.