Courseiva
Back to Salesforce Certified Platform Developer I (SALESFORCE-PD1) questions

Scenario-based practice

Hard Difficulty Questions

Practise Salesforce Certified Platform Developer I (SALESFORCE-PD1) practice questions — original exam-style scenarios covering every exam domain, with detailed explanations, wrong-answer analysis, and common exam traps.

20
scenario questions
SALESFORCE-PD1
exam code
Salesforce
vendor

Scenario guide

How to approach hard difficulty questions

These are the questions most candidates get wrong. They require connecting multiple concepts, reading tricky output, or knowing edge-case behaviour that isn't on most study cards. Practising them trains you to operate under uncertainty — a necessary skill on the real exam.

Quick answer

Hard Difficulty Questions questions test whether you can apply the concept in context, not just recognise a definition.

How the topic appears in realistic exam-style scenarios.

Which detail in the question changes the correct answer.

How to eliminate plausible but wrong options.

How to connect the question back to the wider exam objective.

Related practice questions

Related SALESFORCE-PD1 topic practice pages

Scenario questions usually connect to one or more exam topics. Use these links to review the underlying concepts behind the scenario.

Practice set

Practice scenarios

Question 1hardmultiple choice
Full question →

A developer writes an Apex method that executes a SOQL query inside a for-loop over a list of 200 Account records. Which governor limit is most likely to be immediately breached?

Question 2hardmultiple choice
Full question →

A developer writes an Apex method that executes a SOQL query using user-supplied search parameters. How can the developer protect against SOQL injection vulnerabilities?

Question 3hardmulti select
Full question →

Which THREE tools or contexts can be used to execute Anonymous Apex code? Choose 3 options.

Question 4hardmultiple choice
Full question →

An application has a requirement to query records owned by subordinate users in the role hierarchy using Apex. Which SOQL feature supports this capability?

Question 5hardmultiple choice
Full question →

A developer needs to iterate over a map of Account IDs to Account sObjects and perform processing on each value. Which loop construct is valid Apex?

Question 6hardmultiple choice
Full question →

A developer is writing code that processes untrusted data and wants to automatically strip fields and relationships that the current user cannot access, without throwing an exception. Which feature should be used?

Question 7hardmulti select
Full question →

Which THREE techniques help prevent hitting governor limits when writing SOQL queries in Apex? Choose 3 answers.

Question 8hardmulti select
Full question →

A developer needs to write a secure SOQL query that prevents unauthorized data exposure by respecting both sharing rules and field-level security. Which TWO approaches can the developer combine to achieve this? (Choose two.)

Question 9hardmultiple choice
Full question →

A developer wants to ensure that a custom Apex REST service method properly handles authentication and executes securely in the context of the calling user. How should the class be defined?

Question 10hardmulti select
Full question →

Which THREE design patterns or tools help ensure secure coding practices regarding CRUD and FLS in Apex? Choose 3 options.

Question 11hardmultiple choice
Full question →

An Apex transaction performs a DML operation, followed by a callout to an external REST API, followed by another DML operation. What exception will Salesforce throw?

Question 12hardmultiple choice
Full question →

When deploying via Metadata API, what happens if a test class fails during the deployment?

Question 13hardmultiple choice
Full 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?

Question 14hardmulti select
Full question →

Which THREE best practices should a developer follow to avoid governor limits when writing SOQL queries in Apex? Choose 3 options.

Question 15hardmulti select
Full question →

Which THREE operations can cause an automatic roll back of an entire Apex transaction? Choose 3 options.

Question 16hardmultiple choice
Full question →

When a record-triggered flow performs an action that causes a trigger to fire, which order of execution phase is this?

Question 17hardmultiple choice
Full question →

An Apex trigger executes a query inside a for-loop to fetch related child records for every parent Account in Trigger.new. The developer notices that when a data load of 200 accounts occurs, the governor limit for total SOQL queries issued is exceeded. How should the developer refactor the code?

Question 18hardmultiple choice
Full question →

A developer creates a custom Lightning Web Component that includes a wired property to retrieve account records. The component needs to react dynamically when the record data is updated via another component on the page. Which decorator should be used on the JavaScript property to receive reactive updates?

Question 19hardmultiple choice
Full question →

A developer has a Queueable Apex job that needs to query large volumes of data and perform updates. To optimize performance and avoid heap size limits, what is the best practice when querying records inside a Queueable Apex job?

Question 20hardmulti select
Full question →

Which THREE features are supported in Salesforce scratch orgs? (Choose three.)

These SALESFORCE-PD1 practice questions are part of Courseiva's free Salesforce certification practice question bank. Courseiva provides original exam-style SALESFORCE-PD1 questions with detailed explanations, topic-based practice, mock exams, readiness tracking, and study analytics.