New answers tagged

2 votes

Are Object Limits available from a Salesforce API?

You have access to 'Object Limits' of an object by 'EntityLimit' which is a Tooling API object. You can do a query to your org, using the Tooling API. An example for the object 'Account' would be: ...
user avatar
  • 21
1 vote

Need help with Flow: This error occurred: LIMIT_EXCEEDED: System.LimitException: Too many SOQL queries: 101

SOQL limits are cumulative across an entire transaction. You likely have a trigger or other flow somewhere that's triggering the error. Unfortunately, you're going to have to learn how to read debug ...
user avatar
  • 440k
4 votes
Accepted

Monitor governor limits in Apex tests

As I was reading @sfdcfox's answer and considering why I felt it missed the mark a bit, I realized there's an approach that would meet my needs better. The idea would be to create a test utility ...
user avatar
1 vote

Monitor governor limits in Apex tests

How I manage this is to add assertions to each test, such as: System.assert(Limits.getCpuTime() <= 9000, 'Exceeded expected CPU time of 9 seconds.'); System.assert(Limits.getDmlStatements() <= ...
user avatar
  • 440k

Top 50 recent answers are included