Salesforce Developers

Salesforce PDI Practice Test & Study Guide

Salesforce Certified Platform Developer 1 (Plat-Dev-201)

Exam code
PDI
Questions
184
Updated
25 Nov 2026

What's in the PDI study guide

  • 184practice questions with answers
  • PDFread and print on any device
  • Test enginepractice and exam modes online
  • 90 daysof free updates
  • Instant access from My Account after payment
  • 90 days of free updates
  • Money-back guarantee – see conditions
  • Help by live chat or email

Price$45

Choose a format

Prices in USD. Downloads appear in My Account once your order is complete.

  • Instant access from My Account after payment
  • 90 days of free updates
  • Money-back guarantee – see conditions
  • Help by live chat or email
Free demo

PDI sample questions

Check the style and quality of the material before you buy.

Question 1

Universal Containers implemented a private sharing model for the Account object. Acustom Account search tool was developed with Apex to help sales representatives findaccounts that match multiple criteria they specify. Since its release, users of the tool reportthey can see Accounts they do not own. What should the developer use to enforce sharingpermission for the currently logged-in user while using the custom search tool?

  • A. Use the schema describe calls to determine if the logged-in users has access to theAccount object. 
  • B. Use the without sharing keyword on the class declaration. 
  • C. Use the UserInfo Apex class to filter all SOQL queries to returned records owned by thelogged-in user. 
  • D. Use the with sharing keyword on the class declaration.

Answer: D

Question 2

How many accounts will be inserted by the following block ofcode? for(Integer i = 0 ; i < 500; i++) { Account a = new Account(Name='New Account ' + i); insert a; } 087. Boolean odk; Integer x; if(abok=false;integer=x;){ X=1; }elseif(abok=true;integer=x;){ X=2; }elseif(abok!=null;integer=x;){ X=3; )elseif{ X=4;}

  • A. X=4 
  • B. X=8 
  • C. X=9 
  • D. X=10 

Answer: A

Question 3

Application Events follow the traditional publish-subscribe model. Which method is used tofire an event?

  • A. Fire() 
  • B. Emit() 
  • C. RegisterEvent() 
  • D. FireEvent() 

Answer: A

Question 4

How should a custom user interface be provided when a user edits an Account in LightningExperience?

  • A. Override the Account's Edit button with Lightning Flow 
  • B. Override the Account's Edit button with Lightning Action 
  • C. Override the Account's Edit button with Lightning page. 
  • D. Override the Account's Edit button with Lightning component. 

Answer: D

Question 5

Universal Containers (UC) uses a custom object called Vendor. The Vendor custom objecthas a Master-Detail relationship with the standard Account object. Based on some internaldiscussion, the UC administrator tried to change the Master-Detail relationship to a Lookuprelationship but was not able to do so. What is a possible reason that this change was notpermitted?

  • A. The Account records contain Vendor roll-up summary fields. 
  • B. The Vendor object must use a Master-Detail field for reporting. 
  • C. The Vendor records have existing values in the Account object. 
  • D. The Account object is included on a workflow on the Vendor object. 

Answer: A

Question 6

Which Salesforce feature allows a developer to see when a user last logged in toSalesforce if real-time notification is not required?

  • A. Asynchronous Data Capture Events 
  • B. Developer Log 
  • C. Event Monitoring Log 
  • D. Calendar Events 

Answer: C

Question 7

An Apex method, getAccounts, that returns a List of Accounts given a search Term, isavailable for Lighting Web components to use. What is the correct definition of a LightingWeb component property that uses the getAccounts method?

  • A. @AuraEnabled(getAccounts, ‘$searchTerm’) accountList; 
  • B. @wire(getAccounts, ‘$searchTerm’) accountList; 
  • C. @AuraEnabled(getAccounts, {searchTerm: ‘$searchTerm’}) accountList; 
  • D. @wire(getAccounts, {searchTerm: ‘$searchTerm’}) accountList; 
Question 8

Which salesforce org has a complete duplicate copy of the production org including dataand configuration?

  • A. Developer Pro Sandbox 
  • B. Partial Copy Sandbox 
  • C. Production 
  • D. Full Sandbox 

Answer: D

Question 9

A developer must create a ShippingCalculator class that cannot be instantiated and mustinclude a working default implementation of a calculate method, that sub-classes canoverride. What is the correct implementation of the ShippingCalculator class?

  • A. Public abstract class ShippingCalculator { public override calculate() { /*implementation*/ } } 
  • B. Public abstract class ShippingCalculator { public virtual void calculate() { /*implementation*/ } } 
  • C. Public abstract class ShippingCalculator { public abstract calculate() { /*implementation*/ } } 
  • D. Public abstract class ShippingCalculator { public void calculate() { /*implementation*/ } }

Answer: B

Explanation

the extending class can override the existing virtual methods by using the override keyword in the method definition. Overriding a virtual method allows you to provide a different implementation for an existing method https://developer.salesforce.com/docs/atlas.en%02us.apexcode.meta/apexcode/apex_classes_extending.htm

Question 10

A developer has an integer variable called maxAttempts. The developer meeds to ensurethat once maxAttempts is initialized, it preserves its value for the lenght of the Apextransaction; while being able to share the variable's state between trigger executions. Howshould the developer declare maxAttempts to meet these requirements?

  • A. Declare maxattempts as a member variable on the trigger definition. 
  • B. Declare maxattempts as a private static variable on a helper class 
  • C. Declare maxattempts as a constant using the static and final keywords 
  • D. Declare maxattempts as a variable on a helper class 

Answer: C

Why RealExamCollection is the best choice for Salesforce PDI exam preparation

Secure your position in a competitive IT industry

The Salesforce PDI certification is a strong way to demonstrate your understanding and ability. Our PDI questions & answers help you prepare for it, so you can secure your current position and move your career forward.

Reviewed by IT professionals

We keep our PDI practice questions up to date, with explanations. The questions and answers on RealExamCollection are reviewed by people with professional experience of Salesforce technologies.

One place to prepare

RealExamCollection brings together the material you need for the Salesforce PDI exam. Explanations are added to the questions to help you understand the logic behind them and prepare for other Salesforce exams.

Updated PDI questions & answers

We update the exam files regularly to add new questions. The date of the latest update is shown at the top of this page.

Free PDI demo before you buy

You can view sample PDI questions on this page before buying, to see the format and pattern of the material.

90 days of free updates

You are eligible for 90 days of free updates after buying the PDI exam. If the file is updated in that time, you can download the latest version from your account.

Ready to prepare?

Salesforce PDI · 184 questions

Choose a format