Guys, C is correct, a DML limit is 150 per transaction, sure, but the record are inserted with the "insert" keyword. So when the 151 record gets an error, the WHOLE transaction is revert. Hence 0 record being saved. You need to use Database.insert(a, false); false being the allOrNothing parameter if you want the first 150 records still being saved when you hit the DML limit ;)
Total number of DML statements issued = 150, the whole transaction will fail https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_apexgov.htm
In one transaction you can insert only 150 records, so whole transaction will crush
upvoted 4 times
...
...
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.
JCTheGenius
Highly Voted 3 years, 2 months agonoox
Highly Voted 2 years, 10 months agoirina_735
Most Recent 1 year, 2 months agojade_min
3 years, 2 months agoSimon28
3 years, 2 months ago