So the system class Limits is available to get the number of any limits against an org. For performance tuning and logging perspective, is it possible to get the Limits for an installed managed package, as it has its own governor limits.

We get those values in the logs if we turn on profiling, but is there a way I can access the Limits values through Apex? For example, I want to use it for the Field Service Lightning package(FSL) from Salesforce. So to do something like FSL.Limits.getQueries().

Thanks for your help


Unfortunately not. A managed package can call the Limits methods to get "their version" of the limits (e.g. queries they've used and have left), but there's no way to get at these values during runtime outside of the package. You'd have to query and parse the logs (if available). You'll probably want to submit an idea. I already did a search and did not immediately find such an idea already, so it probably does not exist as of yet.

  • Great thanks sfdcfox. Wanted the confirmation from the pro :)
    – krishnaSF
    Jul 4 '19 at 16:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.