Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam CRT-450 All Questions

View all questions & answers for the CRT-450 exam

Exam CRT-450 topic 1 question 196 discussion

Actual exam question from Salesforce's CRT-450
Question #: 196
Topic #: 1
[All CRT-450 Questions]

How many Accounts will be inserted by the following block of code?

  • A. 100
  • B. 150
  • C. 0
  • D. 500
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
JCTheGenius
Highly Voted 3 years, 2 months ago
Because of DML limit set to 150
upvoted 7 times
...
noox
Highly Voted 2 years, 10 months ago
Selected Answer: C
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 ;)
upvoted 7 times
...
irina_735
Most Recent 1 year, 2 months ago
Selected Answer: C
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
upvoted 1 times
...
jade_min
3 years, 2 months ago
Why is the answer 0? I thought it might be 500 cause it loop for 500 circles with different name on the new Account.
upvoted 2 times
Simon28
3 years, 2 months ago
In one transaction you can insert only 150 records, so whole transaction will crush
upvoted 4 times
...
...
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.

SaveCancel
Loading ...