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
sandy sfdcsandy sfdc 

System.LimitException:Too many SOQL queries:101

Hi,
we have Lead trigger in managed package,one of my clients(they have their own trigger on Lead also) getting "Error:System.LimitException:MANAGEDPACKAGE NAME: Too many SOQL queries:101 (MANAGEDPACKAGE NAME)" in their production during the lead conversion at Converted Status field.But we didn't get any errors from other users who are in production.

can any one clarify us..root cause of this error.

Here the propblem is only one user getting this error at some time during Lead Conversion not all the time...

our triggers also Bulkified,no soql in loops..but the user getting error with my managed package namespace.

Please help us to know where the issue is comming from package trigger or clients trigger....and also soql limits consider for managed package triggers??..
Yaswanth KothapalliYaswanth Kothapalli
Hi Sandy,

We can check few things in your scenario. 
- Can the affected user check the debuglogs at the time of reproducing the issue.
- Make all the filters to Finest when setting the debug logs.
- There is a tool called "SOQL Extractor and Analyzer for SalesForce" which is addon. Once  the debuglogs are captured, you can use this to understand how many times the SOQL has run and the count details. 

In this way we can troubleshoot what is exactly causing the issue. If you can log a case with Salesforce regards the same, they can enable the namespace for the managed package, so that managed package logs are also captured in the debuglogs.

Hope this gives some idea.