A developer must modify the following code snippet to prevent the number of SOQL queries issued from exceeding the platform governor limit. The above method might be called during a trigger execution via a Lightning component. Which technique should be implemented to avoid reaching the governor limit?

QuestionsCategory: CRT-450A developer must modify the following code snippet to prevent the number of SOQL queries issued from exceeding the platform governor limit. The above method might be called during a trigger execution via a Lightning component. Which technique should be implemented to avoid reaching the governor limit?
Admin Staff asked 4 months ago
A developer must modify the following code snippet to prevent the number of SOQL queries issued from exceeding the platform governor limit.
 Image
The above method might be called during a trigger execution via a Lightning component.
Which technique should be implemented to avoid reaching the governor limit?

A. Refactor the code above to perform the SOQL query only if the Set of opportunityIds contains less 100 Ids.

B. Use the System.Limits.getLimitQueries() method to ensure the number of queries is less than 100.

C. Refactor the code above to perform only one SOQL query, filtering by the Set of opportunityIds.

D. Use the System.Limits.getQueries() method to ensure the number of queries is less than 100.








 

Suggested Answer: C

Community Answer: C



This question is in CRT-450 Salesforce Certified Platform Developer I Exam
For getting Salesforce Certified Platform Developer I











Disclaimers:
The website is not related to, affiliated with, endorsed or authorized by Salesforce. 
Trademarks, certification & product names are used for reference only and belong to Salesforce.
The website does not contain actual questions and answers from Salesforce's Certification Exams.

Next Post

Recommended

Welcome Back!

Login to your account below

Create New Account!

Fill the forms below to register

Retrieve your password

Please enter your username or email address to reset your password.