Salesforce · PDI
Validates the ability to design, develop, and deploy custom applications on the Salesforce Lightning Platform using Apex, Visualforce, and Lightning Components. Demonstrates proficiency in process automation, user interface development, testing, and deployment.
Practice Questions
600
≈ 10 practice exams
Duration
105 minutes
Passing Score
68%
Difficulty
AssociateLast Updated
Jun 2026
Use this PDI practice exam to prepare for Salesforce Certified Platform Developer I (PDI) with realistic questions, detailed explanations, and focused study modes. The practice bank includes 600 questions for Salesforce PDI, so you can review the exam steadily instead of relying on one long cram session.
As you practice, pay extra attention to recurring topics such as Process Automation & Logic, User Interface (Visualforce & LWC), Developer Fundamentals, Testing & Debugging, and Deployment. Start with short sessions to identify weak areas, then move into timed quizzes once your accuracy is consistent.
The explanations are especially useful when you want to connect exam wording to the responsibilities and scenarios described in the official certification guidance. Use the free preview first, then unlock the full question bank when you are ready to build a complete study routine.
The Salesforce Certified Platform Developer I (PDI) credential validates a developer's ability to design, build, test, and deploy custom applications on the Salesforce Lightning Platform. It covers both declarative and programmatic development techniques, requiring demonstrated proficiency in Apex (Salesforce's proprietary Java-like language), Visualforce, Lightning Web Components (LWC), and Aura Components. Candidates must understand the platform's multi-tenant architecture, the Model-View-Controller (MVC) framework as applied to Salesforce, and governor limits that constrain resource usage in shared environments.
Beyond code, the exam tests knowledge of data modeling with standard and custom objects, SOQL and SOSL query languages, DML operations, process automation tools (such as Flow and approval processes), platform security (sharing rules, profiles, permission sets), and the full deployment lifecycle using Salesforce DX, Change Sets, and the Salesforce CLI. The PDI is considered the foundational developer credential in the Salesforce ecosystem and is a prerequisite stepping stone toward the Platform Developer II and other advanced technical certifications.
This certification is designed for developers who have hands-on experience building custom applications on the Salesforce Lightning Platform—typically those with six months to two years of Salesforce development experience. Ideal candidates work in roles such as Salesforce Developer, Junior Developer, Technical Consultant, or Salesforce Administrator looking to move into a developer track. They should be comfortable writing Apex code, constructing Visualforce pages, and building Lightning Web Components in a professional or sandbox environment.
While developers are the primary audience, the broad scope of knowledge tested makes the certification valuable for Solution Architects, Technical Leads, and even experienced Administrators who want a deeper understanding of the platform's programmatic capabilities. No official prerequisite certification is required, though familiarity with Administrator and Platform App Builder concepts is strongly recommended.
There are no mandatory prerequisite certifications for the PDI exam, but Salesforce recommends that candidates possess the equivalent knowledge covered by the Salesforce Certified Administrator and Salesforce Certified Platform App Builder exams before attempting this credential. A solid grasp of declarative automation tools—Flows, validation rules, formula fields, and approval processes—is essential, as the exam tests when to use declarative versus programmatic solutions.
On the technical side, candidates should have practical experience writing Apex classes, triggers, and unit tests; constructing SOQL and SOSL queries; and working with the Lightning Component framework. Familiarity with object-oriented programming principles (inheritance, polymorphism, collections) and relational database concepts (entity relationships, normalization) is assumed. Salesforce recommends completing the Trailhead Cert Prep: Platform Developer I trail, which consists of four modules covering Fundamentals, Database Modeling, Process Automation, and User Interfaces.
The Salesforce Certified Platform Developer I exam consists of 60 scored multiple-choice and multiple-select questions. Candidates are given 105 minutes to complete the exam. The passing score is 68%, meaning a candidate must correctly answer approximately 41 of the 60 questions. The exam is delivered through Pearson VUE and can be taken either at an authorized testing center or via online proctoring. The registration fee is $200 USD, with a retake fee of $100 USD.
Multiple-select questions require candidates to choose all correct answers from a list (typically two or three correct options out of five), and partial credit is not awarded—all correct choices must be selected. The exam is currently offered in English. Salesforce periodically updates the exam to reflect platform releases; candidates should download the current exam guide PDF from the official Salesforce developer certification site before studying to confirm the latest objective weights.
Earning the Salesforce Certified Platform Developer I credential significantly increases employability in the Salesforce ecosystem, which remains one of the fastest-growing segments of enterprise software. Certified Salesforce Developers in the United States earn average base salaries ranging from approximately $96,000 to $120,000 annually, with senior developers and architects commanding $145,000 or more. The certification provides a verifiable, vendor-recognized signal of competency that distinguishes candidates in a competitive job market and is frequently listed as a requirement or strong preference in Salesforce Developer, Technical Consultant, and Solution Architect job postings.
The PDI also serves as the gateway to more advanced Salesforce technical credentials, including the Salesforce Certified Platform Developer II, JavaScript Developer I, and Salesforce Architect certifications. Organizations that are Salesforce partners track certified headcount to maintain tier status, creating institutional demand for certified professionals. The broader Salesforce services market is projected to exceed $24 billion by 2029, ensuring sustained demand for skilled, credentialed platform developers across industries including financial services, healthcare, retail, and technology.
5 sample questions with answers and explanations. The full bank has 600 questions, enough for 10 full-length practice exams.
Preview — answers shown1. A developer at Ursa Major Solar is building a Lightning Web Component dashboard. The component must set a default value for a private variable called chartData when the component is instantiated, and then retrieve a DOM canvas element using this.template.querySelector() to initialize a third-party charting library after the template has finished rendering. Which lifecycle hooks should be used for each respective task? (Select one!)
Explanation
constructor() is the very first lifecycle hook invoked when an LWC component is created and is the correct place to initialize private variables and set default property values. The component's DOM does not yet exist during constructor(), so querySelector() cannot be used at that point. renderedCallback() fires after the component's template has been fully rendered to the DOM, making it the safe and appropriate hook for querying DOM elements via this.template.querySelector(). connectedCallback() fires when the component is inserted into the DOM but before the initial render completes, meaning template elements may not yet be accessible via querySelector() at that stage. disconnectedCallback() fires when the component is removed from the DOM and is intended only for cleanup tasks such as removing event listeners, not for DOM queries or variable initialization.
2. A developer at AW Computing writes an Apex method that calls Database.upsert() on a list of Lead records using a custom external ID field called External_ID__c. During execution, two distinct situations arise: Lead A has no Salesforce record ID and no value populated in the External_ID__c field. Lead B has a value in External_ID__c that matches three separate existing Lead records in the org. Which two outcomes accurately describe what happens? (Select two!)
Multiple correct answersExplanation
When Database.upsert() is called, the platform follows a specific matching algorithm: if a record has a Salesforce ID it is updated, if an external ID field value matches exactly one existing record it is updated, and if no ID or external ID match is found the record is inserted as new. Lead A has neither a Salesforce ID nor a populated external ID value, so the platform finds no match and inserts it as a brand-new record — a populated external ID is not required for upsert to function. Lead B has an external ID value that matches three existing records simultaneously, creating an ambiguous match — the upsert operation cannot determine which single record to update, so it throws a DmlException for that specific record. Updating the first matching record is not how the platform behaves; ambiguous external ID matches always result in an exception. Using the Database.upsert() method (as opposed to the upsert DML statement) performs partial success processing by default with allOrNone set to false, meaning Lead A can succeed as an insert even if Lead B fails — the entire operation does not automatically roll back.
3. A developer at Northern Trail Outfitters creates a test class that includes both a @TestSetup method to insert controlled test records and the @isTest(SeeAllData=true) annotation on the class. A senior developer flags this combination as invalid during code review. Why can these two annotations not be used together on the same test class? (Select one!)
Explanation
The Salesforce platform explicitly prohibits combining @TestSetup with @isTest(SeeAllData=true) in the same test class. These two features operate on opposite philosophies: @TestSetup creates an isolated, controlled data set that each test method receives as an unmodified copy to ensure test independence, while SeeAllData=true bypasses data isolation entirely and gives the test class access to all live org data. Using both simultaneously is contradictory and Salesforce enforces this restriction at runtime. The @isTest(SeeAllData=true) annotation is valid at both the class and method level. @TestSetup does not implicitly enable SeeAllData — it creates isolated data that is rolled back after each test method. There is no @isTest(SeeAllData=false) annotation because test isolation is the default behavior without any additional declaration.
4. A developer at DreamHouse Realty writes an after insert trigger on the Property__c object. After a Property__c record is inserted, the trigger attempts to insert a GroupMember record to automatically add the property owner to an internal group. During testing, the trigger throws an unexpected runtime exception. Which statement correctly identifies the cause and the recommended production-safe resolution? (Select one!)
Explanation
Salesforce enforces a mixed DML restriction that prohibits a single transaction from performing DML on both setup objects (User, Group, GroupMember, PermissionSet, PermissionSetAssignment) and non-setup objects simultaneously. This restriction applies regardless of trigger context (before or after) and throws a runtime exception when violated. The recommended production-safe workaround is to move the setup object DML into an @future method, which runs asynchronously in a completely separate transaction after the current one completes. System.runAs() can bypass this restriction only inside test methods; it is not a valid workaround in production Apex trigger code. Trigger context type has no effect on the mixed DML restriction. Apex triggers are fully capable of performing DML on setup objects as long as no non-setup DML occurs in the same transaction.
5. A developer at Northern Trail Outfitters needs to write an Apex SOQL query that returns the total Amount of all Closed Won Opportunities grouped by AccountId, and restricts the results to only those Accounts where the summed Closed Won amount exceeds $500,000. Which SOQL query correctly implements this requirement? (Select one!)
Explanation
The correct query uses WHERE to filter individual Opportunity records by StageName before aggregation occurs, and then uses HAVING to filter the grouped results based on the aggregate function SUM(Amount) after GROUP BY is applied. This is the required SOQL pattern whenever both record-level conditions and aggregate conditions must be applied in the same query. Aggregate functions such as SUM() cannot appear in a WHERE clause because WHERE operates on individual records before any grouping takes place — referencing SUM(Amount) inside WHERE causes a compile-time error. SOQL does not support aliasing aggregate results with labels like 'total' for use in subsequent filter clauses, and WHERE must always precede GROUP BY in query syntax. Referencing the non-aggregated Amount field directly in a HAVING clause is invalid when Amount is not included in the GROUP BY clause — HAVING can only reference fields that are grouped or wrapped in an aggregate function.
Salesforce Certified Marketing Cloud Engagement Consultant (MCE-Con-201)
MCE-Con-201 · 600 questions
Salesforce Certified Platform Administrator
SCA · 600 questions
Salesforce Certified Platform App Builder
App-Builder · 600 questions
Salesforce Certified Sales Cloud Consultant
Sales-Cloud · 598 questions
Salesforce Certified Service Cloud Consultant
Service-Cloud · 600 questions
Salesforce Certified Advanced Administrator (CRT-211)
CRT-211 · 600 questions
$17.99
One-time access to this exam