7

I keep searching and I can't seem to find it, I need to output the number of SOQL Statements used at a given point in my class (to make my class more efficient), something like:

System.debug('Count of SOQL Queries used: '+__);

I know it's possible but I can't find a link to the docs.

Thanks to @Adrian Larson for quickly solving my mental block!!!

Limits Class

10

It's the Limits class:

Integer queriesUsed = Limits.getQueries();
  • Thank you! I'll add documentation to my original question – jordan.baucke Sep 15 '16 at 18:10

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .