Platform Developer · Sample questions
10 real questions from the CertifyDeck Platform Developer bank, spread across the domains of the official Salesforce Certified Platform Developer skills outline, with the correct answer and a full explanation of why the other options are wrong. They are original questions written from the public syllabus, not exam dumps, and they are the same style you will find in the practice tests and mock exams.
Correct answer: B. Load a CSV static resource with Test.loadData() in a @TestSetup method
Test data loaded from a CSV file stored as a static resource with Test.loadData() lets the team add to or modify the data inputs without deploying code. A factory method still requires a code change for each variation, and reading org data with SeeAllData=true makes tests depend on data that differs between environments; records inserted by anonymous Apex are org data, which tests cannot see by default.
Correct answer: B. The assertion fails, because the query returns six contacts
The platform runs the @TestSetup method before each test method in the class, so the test method sees the setup contact plus the five contacts the factory creates: 1 + 5 = 6, and the assertion for five fails. The setup data is reset between test methods, but it is recreated and visible to each one, not removed before the method runs.
Correct answer: B. Each class keeps the API version it was saved with, and that version is not updated each release
Apex is upgraded automatically along with Salesforce, but each class has an API version that is not updated every release, which prevents code from breaking when a new version of Salesforce arrives. Redeploying every class with the newest API version is not required and would remove that protection. Sharing keywords control record access, not release behavior, and there is no separate Apex upgrade that an administrator installs.
Correct answer: D. End_Date__c < Start_Date__c
A validation rule blocks the save when its error condition formula returns True, because True means the data is invalid, so the formula must describe the invalid case: an end date earlier than the start date. The formulas with greater than or greater than or equal return True for valid bookings and would block exactly the records that should be saved. ISBLANK only detects a missing end date and does not compare the two dates.
Correct answer: B. As an Auto Number name with a display format
Record names can be text or auto-numbered names that increment every time a record is created, and an auto number takes a display format such as WO-{0000}. A trigger could fill the name but breaks the no-code requirement. A validation rule only checks what a user types, and a separate formula field leaves the name field itself to be entered by hand.
Correct answer: D. Lightning Web Security
Lightning Web Security (LWS) is the architecture that aims to replace Lightning Locker and makes secure coding practices easier for components. CSP Trusted Sites is only an allowlist of external origins for certain CSP directives. Lightning Data Service is the data layer for records, and Shadow DOM is the encapsulation mechanism for a component's elements and styles, not a replacement for Locker.
Correct answer: D. lightning-datatable fed with records returned by Apex
lightning-datatable is the preferred way to work with lists of records and provides infinite scrolling, inline editing, header and row-level actions and resizing; it is commonly fed by calling Apex. lightning-record-form and lightning-record-view-form work with one record at a time, and a plain for:each list would require building every table feature by hand.
Correct answer: C. Compare o.StageName with Trigger.oldMap.get(o.Id).StageName for each record
Trigger.oldMap maps each Id to the old version of the record and is available in update triggers, so looking up the same Id gives the value before the update for every record in the batch. Trigger.old[0] is always the first record, Trigger.newMap holds the new versions, which equal o, and a query inside the loop runs once per record and is not bulk-safe.
Correct answer: C. Remove the update statement, because the platform saves the records after a before trigger
Records that fire a before trigger are saved by the system after the trigger finishes, so field changes on Trigger.new need no DML, and running DML on those same records causes an error. Moving to after update does not help, because the records that fire an after trigger are read-only. Catching the error or using a Database method still performs the unnecessary DML on the trigger records.
Correct answer: A. Annotate the public properties of PriceRequest and PriceResult with @InvocableVariable.
Properties of inner classes annotated with @InvocableVariable are what pass data between the flow and the invocable method, as the documented request and response classes show. @InvocableMethod goes on the method, not on the data classes. @api makes Lightning web component properties public, and @AuraEnabled exposes methods to Lightning components rather than defining flow inputs and outputs.
Answer each question before opening the explanation, and write down why you discarded the other options. On Platform Developer, most mistakes come from choosing an option that is technically possible but does not meet every requirement in the scenario.
These 10 questions are a taste of the format, not a diagnostic. To know which domains you fail, practice by domain for free and take a timed mock exam that mirrors the official weights and duration.
Start for free, no sign-up or card. Every question includes an explanation like the ones above, and the mock exam reproduces the official Platform Developer format.