Salesforce Platform Developer I (legacy) — Question 232

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

Answer options

Correct answer: B, C

Explanation

Choosing option B is correct because using the 'Limits' class allows developers to monitor their usage and avoid hitting governor limits. Option C is also correct as SOQL for loops help manage memory consumption by processing records in manageable chunks. Options A and D are incorrect because they can lead to exceeding governor limits by storing unnecessary data and using excessive memory, respectively.