SalesforceSalesforce
PDI · Question #196
PDI Question #196: Real Exam Question with Answer & Explanation
The correct answer is C: 0. The code attempts to insert accounts, but the DML operation results in 0 records being successfully inserted, likely due to an uninitialized list, an empty list, or a transaction-rolling-back DML exception.
Submitted by marco_it· Apr 18, 2026Data Modeling and Management
Question
How many Accounts will be inserted by the following block of code?
Options
- A100
- B150
- C0
- D500
Explanation
The code attempts to insert accounts, but the DML operation results in 0 records being successfully inserted, likely due to an uninitialized list, an empty list, or a transaction-rolling-back DML exception.
Common mistakes.
- A. This option implies a successful insertion of 100 accounts, which would not happen if the DML operation failed or was performed on an empty list.
- B. This option implies a successful insertion of 150 accounts, which would not happen if the DML operation failed or was performed on an empty list.
- D. This option implies a successful insertion of 500 accounts, which would not happen if the DML operation failed or was performed on an empty list.
Concept tested. Apex DML operations and governor limits
Reference. https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dm_insert.htm
Topics
#Apex DML#List Operations#Data Insertion#Database Operations
Community Discussion
No community discussion yet for this question.