Which two strategies should a developer use to avoid hitting governor - ProProfs Discuss
Topics
Products
Follow Us:

Which two strategies should a developer use to avoid hitting governor limits when developing ina multi-tenant environment?

This question is part of Platform Dev I
Asked by Csouza, Last updated: Feb 08, 2020

+ Answer
Request

3 Answers

Nate

Nate

Answered Oct 12, 2018

Use methods from the “Limits” to monitor governor limits

Use SOQL for loops to iterate data retrieved from queries that return a high number of rows

1
 

yesi_

Yesi_

Answered Oct 14, 2018

Use methods from the “Limits” to monitor governor limits

Use SOQL for loops to iterate data retrieved from queries that return a high number of rows

Developers should always use a SOQLforloop to process query results that return many records, to avoid the limit onheap size.

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_loops_for_SOQL.htm

 

csouza

Csouza

Answered Sep 17, 2018

Use collections to store all fields from a related object and not just minimally required fields
Use methods from the "LIMITS" class to monitor governor limits
 

Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer

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