Exam PDI Topic 2 Question 40 Discussion
Actual exam question for Salesforce's PDI exam
Question #: 40
Topic #: 2
Question #: 40
Topic #: 2
How many Accounts will be inserted by the following block of code?


Suggested Answer: D Vote an answer
Execution Flow:
The loop runs 500 times (iranges from 0 to 499).
In each iteration, a newAccountrecord is created and inserted.
Governor Limits:
This code violates the governor limit of 150 DML statements per transaction because eachinsertis executed individually.
However, the code logically attempts to insert 500 accounts.
Key Consideration:
The code demonstrates inefficient handling of DML operations and would fail in a real-world scenario.
References:Governor Limits:https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode
/apex_gov_limits.htm
The loop runs 500 times (iranges from 0 to 499).
In each iteration, a newAccountrecord is created and inserted.
Governor Limits:
This code violates the governor limit of 150 DML statements per transaction because eachinsertis executed individually.
However, the code logically attempts to insert 500 accounts.
Key Consideration:
The code demonstrates inefficient handling of DML operations and would fail in a real-world scenario.
References:Governor Limits:https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode
/apex_gov_limits.htm
by Cynthia at Nov 28, 2025, 08:54 PM
0
0
0
10
Comments
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.
Report Comment
Commenting
You can sign-up / login (it's free).