Governor limits in Salesforce

Can someone explain me about Governor limits in Salesforce application in brief.

2 Likes

Salesforce is Apex based platform, which runs in multi-tenant environment. In this architecture, a single resource is shared by all the customers and organizations. To ensure that the Apex code or processes don’t preoccupy the shared resource, the governor limits are enforced.

There are number of governor limits in Salesforce. Here, is the list:

  1. Per-Transaction Apex Limits
  2. Per-Transaction Certified Managed Package Limits
  3. Lightning Platform Apex Limits
  4. Static Apex Limits
  5. Size-Specific Apex Limits
  6. Miscellaneous Apex Limit

Also one of the most important thing from developer’s perspective is that, the code should be scalable & should not hit the governor limits. Some of the best practices from developer’s end:

  • Avoid using SOQL and DML statements under loops
  • usage of @future appropriately
  • using batch apex if working for more than 50000 records.

So, it is not only important for the organization which is involved in product development but also for those which are providing the QA services, that the Governor limits are enforced properly.

Hope this information is helpful for you.