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 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 2hardmultiple choice
Full question →

A developer creates an Apex trigger that updates related Contact records whenever an Account record is updated. The trigger performs a DML operation on the Contacts. During testing, updating an Account causes the trigger to fire infinitely and throw a System.LimitException: Maximum trigger depth exceeded. Which design pattern should the developer implement to prevent this recursion?

Question 3hardmultiple choice
Full question →

A developer is configuring a Lightning Web Component that uses the Lightning Message Service (LMS). Which module must be imported to publish a message on a message channel?

Question 4hardmultiple choice
Full question →

A developer creates a custom LWC that wraps child components. The developer needs to pass styling from the parent component into specific slots of the child component. Which CSS selector should be used inside the child component to style content passed into a slot?

Question 5hardmultiple 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 6hardmulti 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 7hardmultiple choice
Full question →

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

Question 8hardmultiple 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 9hardmultiple 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 10hardmulti select
Full question →

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

Question 11hardmultiple choice
Full question →

A Queueable Apex job implements Database.AllowsCallouts and chains another Queueable job. What is the maximum number of jobs that can be chained in a single transaction chain?

Question 12hardmultiple choice
Full question →

When using the Salesforce CLI to deploy, what is the 'check-only' flag used for?

Question 13hardmulti select
Full question →

Which THREE limitations apply to Apex Triggers? (Choose THREE.)

Question 14hardmultiple choice
Full question →

When testing asynchronous Apex, how do you ensure that the scheduled job has finished before asserting results?

Question 15hardmultiple choice
Full question →

A developer implements a Batch Apex class that updates millions of records. During the execution of the execute method, a transient database error occurs on a single record. What happens to the batch job by default if Database.executeBatch is called without additional parameters?

Question 16hardmultiple choice
Full question →

What is the primary constraint on using @testSetup?

Question 17hardmultiple choice
Full question →

When testing a class that depends on Custom Settings, what is the best practice?

Question 18hardmultiple choice
Full question →

A developer is working with the Lightning Data Service (LDS) via the @wire decorator to get record data. The record is updated elsewhere in the app, and the developer wants to imperatively refresh the wire data cache. Which function should be called?

Question 19hardmultiple choice
Full question →

During the Salesforce save order of execution, when are before triggers executed relative to custom validation rules?

Question 20hardmulti select
Full question →

A developer is troubleshooting a transaction that exceeds governor limits due to SOQL queries. Which THREE techniques help prevent hitting SOQL query limits in Apex? (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.