Which two strategies should a developer use to avoid hitting governor - ProProfs Discuss
Cancel
TopicsDown
Products Down
Follow Us:
FacebookTwitter
Advertisement

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

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

+ Answer
Request
Question menu
Vote up Vote down

5 Answers

r.gargnov4

r.gargnov

r.gargnov4
R.gargnov

Answered May 09, 2020

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.

upvote downvote
Reply 

D. gray

D. gray

Building buildings and building intelligence

D. gray
D. gray, Builder, Builder, Las Vegas

Answered Feb 26, 2019

The correct answer to this question: 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.

To avoid hitting governor limits when developing in a multi-tenant environment, a developer should use methods from the LIMITS class to monitor the govermor limits in order to be aware of what those limits are at all times.

The developer should also use SOQL for loops to iterate date retreived from queries that return a high number of rows. SOQL is Salesforces object query language. When you use this, you can search your organization's data for specific information. You can use the SOQL in Apex statements, query string parameter in the query, Visualforce controllers and getter methods, and the Schema Explorer of the Force dot com IDE.

upvote downvote
Reply 

Souvik Ghosh

Souvik Ghosh

Souvik Ghosh
Souvik Ghosh

Answered Sep 01, 2018

Can you please confirm which set of answers are correct ?

upvote downvote
Reply 

Prashant Kumar

Prashant Kumar

Prashant Kumar
Prashant Kumar

Answered Aug 25, 2018

Use methods from the LIMITS class to monitor governor limits.
Use SOQL for loops to iterate data retrieved from queries that return a high number of rows.

upvote downvote
Reply 

csouza718

csouza

csouza718
Csouza

Answered Jul 19, 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
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.