SF-PD2 Testing, Debugging, and Deployment Practice Question
Exhibit
ERROR: System.LimitException: Too many DML statements: 151 Trigger: AccountTriggerHandler Line: 42
Refer to the exhibit. A developer encounters this error while performing a bulk update of 200 Account records. What is the root cause of this exception?
⚠ Common exam trap
Candidates often mistake this for a record-level validation error or a governor limit related to total records processed, failing to identify that the specific error stems from DML inside a loop.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The developer is performing individual DML operations inside a loop instead of bulkifying.
The error indicates that the code is executing DML operations inside a loop rather than performing bulk DML on a collection. In Salesforce, DML operations are limited to 150 per transaction. This is a critical architectural violation because it prevents code from scaling to meet the demands of bulk processing, causing runtime failures during batch updates or heavy user activity, which leads to poor system reliability.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The trigger logic is attempting to update the same record more than 150 times.
Why it's wrong here
The limit is per-transaction, not per-record. Updating a single record 150 times would also hit the limit, but the error message specifically points to the count of DML statements. The issue is the frequency of individual DML calls, not the number of updates performed on a single specific record instance.
- ✓
The developer is performing individual DML operations inside a loop instead of bulkifying.
Why this is correct
Salesforce enforces a strict limit of 150 DML statements per transaction. When a developer places an update statement inside a loop processing 200 records, the limit is exceeded as soon as the 151st iteration occurs. Bulkifying by adding records to a list and performing one DML call is the required fix.
- ✗
The batch size in the data loader is set too high for the current trigger logic.
Why it's wrong here
While batch sizing matters, the governor limit is absolute. Even with a batch size of 200, if the logic is unoptimized, it will fail. Adjusting the batch size is a workaround, not a fix. The code itself must be refactored to support bulk operations to ensure it remains compliant under load.
- ✗
The org-wide daily DML limit has been exceeded due to high transaction volume.
Why it's wrong here
The error shown is a transaction-level limit exception, not a daily limit. Daily limits trigger different messages and behaviors. The '151' value specifically refers to the count of DML statements within the current execution scope, clearly indicating a design pattern failure where individual statements are being executed too frequently.
About these practice questions
This SF-PD2 question is part of Courseiva's 226-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Salesforce exam blueprint
This SF-PD2 practice question is part of Courseiva's free Salesforce certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SF-PD2 exam.