This
Question even nudges you to think about some 10k limit
And try/catch shouldn't be used with DML exceptions
https://www.crmscience.com/single-post/2020/05/20/how-salesforce-developers-handle-errors-with-try-catch-rollback-best-practices
I would go with the C:
System.LimitException: Too many DML rows: 10001 is DmlException that is thrown by the Database.update statement! In a try-catch block the exception is handled (DmlException extends Exception)
In this example, the code updates 50,000 Case records, which exceeds the limit of 10,000 records per DML statement. Therefore, the transaction will fail due to exceeding the governor limit, and an exception will be thrown.
I agree with noox here. To elaborate on his point:
It isn't B because no governor limits are being exceeded.
It isn't C because we are utilizing Database.update with allOrNone set to false, meaning any updates that potentially fail will not result in an overall failure.
It isn't D because Limit Exceptions cannot be caught.
SOQL can retrieve 50.000 records.
The org has only 10.000 records.
The records are placed inside a list.
Then the entire list is updated. So DML count is 1/150.
This section is not available anymore. Please use the main Exam Page.CRT-450 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
ApexMike
Highly Voted 1 year, 7 months agoDean5555
1 year, 7 months agoElAprendiz
Highly Voted 1 year, 7 months agoSanjeevOnForce
Most Recent 6 months, 3 weeks agoirina_735
8 months, 1 week agovancika
1 year, 1 month agoBrucePark
10 months agoDonAldos
1 year, 1 month agofreeP
1 year, 3 months agosmoota
1 year, 4 months agovancika
1 year, 1 month agoRajiv1406
1 year, 8 months agoRajiv1406
1 year, 8 months agoAsmodahlia
1 year, 10 months agoliadc
2 years, 1 month agonoox
2 years, 4 months agoPrince2010
1 year, 6 months agonoox
2 years, 4 months agoJCTheGenius
2 years, 9 months agoPally88
2 years, 10 months ago