How can a developer avoid exceeding governor limits when using an - ProProfs Discuss
Advertisement

How can a developer avoid exceeding governor limits when using an Apex Trigger?

How can a developer avoid exceeding governor limits when using an Apex Trigger?

Change Image    Delete



Asked by Sudhanshu, Last updated: Jun 28, 2022

+ Answer
Request
Question menu
Vote up Vote down

2 Answers

John Smith

John Smith

John Smith
John Smith

Answered Dec 22, 2016

By using Maps to hold data from query results.
By performing DML transactions on lists of SObjects.
upvote 1 downvote
Reply 

g.Kenneth

g.Kenneth

g.Kenneth
G.Kenneth

Answered Jan 24, 2018

Apex is a computer programming or coding language. It seems like it is similar to Java. Salesforce is responsible for putting out Apex. Because Apex is large and multitenancy which means that many users may use the single software which may make it run slowly or cause problems.

So, there were limitations given in order for this not to occur. Sometimes, the limits can change and be started over when the batch has been finished. Then the limits will start over. So, if a developer wants to avoid going past these limits set by an associated governor while using the Apex trigger, he or she must use maps to hold the data from the query results. Also, they can perform DML transactions on lists of objects.

upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

Email Sent
We have sent an email to your address "" with instructions to reset your password.