Tuesday 11 August 2015

What are governor limits in salesforce??

Governor limits are run time limits enforced by the Apex run time engine since Apex runs in a shared, multi tenant environment, the Apex run time engine strictly enforces a number of limits to ensure that code does not monopolize shared resources.


Types of limits that Apex enforces are resources like memory, database resources, number of script statements to avoid infinite loops, and number of records being processed.

If code exceeds a limit, the associated governor issues a run time exception.

For more information please refer to the link:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_gov_limits.htm

If you need to have much more detail explanation
eg:-
If you are creating vf page and apex class, you are using more number of soql queries may lead to exceedd Governor limits.

So, you need to plan according to your requirement. Sometimes it is better to write helper class and call that class in triggers to avoid Governor limits.


No comments:

Post a Comment