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?



A. Use variables within Apex classes to store large amounts of data
B. Use collections to store all fields from a related object and not just minimally requiredfields
C. Use methods from the \LIMITS\ class to monitor governor limits
D. Use SOQL for loops to iterate data retrieved from queries that return a high number of rows

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

+ Answer
Request

4 Answers

D. gray

Building buildings and building intelligence

D. gray, Builder, Builder, Las Vegas

Answered Feb 26, 2019

The correct answer to this question is C and D. 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.

 

Souvik Ghosh

Souvik Ghosh

Answered Sep 01, 2018

Can you please confirm which set of answers are correct ?

 

Prashant Kumar

Prashant Kumar

Answered Aug 25, 2018

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

 

csouza

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
 

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.