Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Exam CRT-450 Topic 7 Question 48 Discussion

Actual exam question for Salesforce's CRT-450 exam
Question #: 48
Topic #: 7
[All CRT-450 Questions]

A developer has identified a method in an Apex class that performs resource intensive actions in memory by iterating over the result set of a SOQL statement on the account. The method also performs a DML statement to save the changes to the database.

Which two techniques should the developer implement as a best practice to ensure transaction control and avoid exceeding governor limits'*

Choose 2 answers

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

Tina
2 days ago
I'm not falling for that read-only trap! Bypassing the SOQL limit? No way, that's a surefire way to get your code shut down. Gotta use those partial DMLs and savepoints to stay on the safe side. Oh, and maybe throw in some comedy relief while you're at it - governor limits are so dry, we need a few good laughs to get through this!
upvoted 0 times
...
Burma
8 days ago
Hmm, I think B and D are the way to go. Partial DML statements and database savepoints are the best practices here to ensure data integrity and avoid governor limit issues. Who needs read-only annotations when you have these powerful tools at your disposal?
upvoted 0 times
...
Ryan
16 days ago
I believe using partial DML statements to ensure only valid data is committed is also important to avoid exceeding governor limits.
upvoted 0 times
...
Mattie
20 days ago
I agree with Cherelle. We should also use the System.limit class to monitor the current CPU governor limit consumption.
upvoted 0 times
...
Cherelle
24 days ago
I think we should use the @ReadOnly annotation to bypass the number of rows returned by a SOQL.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77