SALESFORCE-PD1 Developer Fundamentals Practice Question
A developer needs to write an Apex trigger that fires before an Account is inserted and accesses the value of the custom field 'Rating__c'. Which collection type is best suited to iterate over the incoming records in the trigger context variable?
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
✓
List<Account>
Trigger.new provides a List of sObjects, making a standard List or for-loop iteration the correct approach for handling trigger context records.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Account[]
Why it's wrong here
While array syntax is valid, List<Account> is the standard idiomatic collection type preferred in Apex.
- ✓
List<Account>
Why this is correct
Trigger.new returns a List of sObjects, which can be directly iterated over using a List.
- ✗
Set<Account>
Why it's wrong here
Sets are unordered collections and do not support standard indexed loops needed for trigger execution flows.
- ✗
Map<Id, Account>
Why it's wrong here
Maps are typically used for before-update or after contexts where existing IDs need to be referenced.
About these practice questions
This SALESFORCE-PD1 question is part of Courseiva's 488-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 August 2026 · checked against the official Salesforce exam blueprint
This SALESFORCE-PD1 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 SALESFORCE-PD1 exam.