SALESFORCE-PD1 Developer Fundamentals Practice Question
An Apex trigger executes during a bulk insert of 300 records. To adhere to best practices regarding governor limits and bulkification, how should SOQL queries be written?
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
✓
Query once outside the loop using a collection of IDs from Trigger.new
Queries must be written using bulkified collections, querying once outside of loops using bind variables for all records in Trigger.new.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Query inside a for-loop iterating over Trigger.new
Why it's wrong here
Querying inside a loop will quickly exceed the 100 SOQL query limit.
- ✗
Query each record individually using Limits.getQueries() checks
Why it's wrong here
Checking limits does not prevent queries from exceeding the maximum limit if executed per record.
- ✗
Use an asynchronous future method for every individual record
Why it's wrong here
Spawning an asynchronous job per record will exceed future method execution limits.
- ✓
Query once outside the loop using a collection of IDs from Trigger.new
Why this is correct
Bulkifying Apex code requires gathering IDs into collections and executing a single query outside of loops.
About these practice questions
Courseiva writes every SALESFORCE-PD1 question from scratch — 493 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.