Free sample · Plat-Dev-301
Platform Developer II practice exam: 10 free questions with answers
10 questions from the Platform Developer II Practice Exams package, all from the Advanced Developer Fundamentals domain. Choose an answer and check it: you'll see whether you were right and why, and your score as you go. The real Plat-Dev-301 exam has 60 questions in 120 minutes.
Reviewed by Nick Gorgotsias, Founder of ForceDigestEvery question is written by ForceDigest from the published exam outline. Nothing is copied from the real exam.
Question 1
A multi-currency org shows opportunities in a Lightning web component. The Apex controller must return each opportunity's amount converted into the running user's personal currency. Which query meets the requirement?
The answer: The right answer is B. convertCurrency() converts a currency field into the user's currency, and it belongs in the SELECT list. It returns an error in a WHERE clause, it can't be used in ORDER BY (sorting already uses converted values), and it can't convert the result of an aggregate function: with GROUP BY, aggregates come back in the corporate currency.Question 2
What does
scontain after this code runs?Datetime dt = Datetime.newInstanceGmt(2026, 7, 15, 14, 30, 0); String s = dt.format('yyyy-MM-dd HH:mm', 'America/New_York');The answer: The right answer is B. format(pattern, timezone) converts the instant to the named time zone before formatting, adjusting for daylight saving time. New York is four hours behind GMT in July, so 14:30 GMT becomes 10:30. The value 14:30 ignores the conversion, 09:30 ignores daylight saving time, and 18:30 converts in the wrong direction.Question 3
Which line of this code breaks the rules for compound fields?
Account acc = [SELECT Id, BillingAddress FROM Account WHERE Id = :accId WITH USER_MODE]; Address addr = acc.BillingAddress; String city = acc.BillingAddress.City; acc.BillingCity = 'Leeds'; update as user acc;The answer: The right answer is C. Compound fields can be selected in Apex SOQL and read by assigning them to an Address variable, as line 2 does. Dot notation on the parent field, as in line 3, isn't allowed: read addr.City instead. The compound field itself is read-only, so changes are written to the component fields, which is exactly what line 4 does.Question 4
A scheduled Apex job writes a file for a finance system that needs every timestamp as Berlin local time in the form 2026-03-31 17:05, whichever user schedules the job. Which expression produces it reliably?
The answer: The right answer is A. format(pattern, timezone) converts to the named zone and applies a fixed Java date pattern, so the output doesn't depend on who runs the job; full zone IDs such as Europe/Berlin are recommended over abbreviations. format() and formatLong() depend on the context user's locale and time zone, and formatGmt() gives GMT time, which differs from Berlin time.Question 5
What happens when this code runs for a Job__c record whose object has a Private org-wide default?
Job__Share s = new Job__Share(); s.ParentId = job.Id; s.UserOrGroupId = recruiterId; s.AccessLevel = 'All'; s.RowCause = Schema.Job__Share.RowCause.Recruiter__c; insert as system s;The answer: The right answer is B. All is an internal access level that can't be granted through a share object; Full Access comes only from managed sharing, such as record ownership. Apex managed sharing grants Read or Edit, and an Apex sharing reason is exactly what RowCause should hold for it in any access mode. The platform doesn't quietly downgrade the row.Question 6
In a class declared
without sharingand saved at API version 68.0, a method runs[SELECT Id, Name FROM Job__c WITH USER_MODE]. Which records can it return?The answer: The right answer is D. A query in user mode always applies the running user's sharing, as well as object and field permissions, whatever the class's sharing keyword says. The keyword decides record access only for operations in system mode. User mode is allowed in any class, and it reports inaccessible fields as errors rather than silently removing them.Question 7
A developer wants a unit test that proves users in a public group gain access to cases through a criteria-based sharing rule. What should the developer know?
The answer: The right answer is D. Salesforce states that criteria-based sharing can't be tested using Apex, and Apex can't create criteria-based sharing rules either, so a test can neither build nor observe that access. SeeAllData doesn't change this, and a recalculation class rebuilds Apex managed sharing, not rule-based sharing.Question 8
During nightly data loads, a trigger must do nothing when the integration user saves records but run normally for everyone else. An administrator must be able to change this without a deployment. Which design is best?
The answer: The right answer is C. A hierarchy custom setting returns the most specific value for the running user, so a checkbox set at the integration user's level and cleared at org level switches off only that user's trigger runs, read from the cache with getInstance(). Custom metadata types don't support values by user, profile or org level, getOrgDefaults() is a hierarchy method, and custom labels hold translatable text.Question 9
A developer stores email templates in a Long Text Area field of a custom metadata type and reads them with
Template__mdt.getInstance('Welcome'). Long templates come back cut short. What explains this, and what is the fix?The answer: The right answer is A. getAll() and the getInstance() methods return only the first 255 characters of any custom metadata field, so long text is truncated, while a SOQL query returns all of the field data. Protection hides whole records rather than parts of fields, long text fields aren't limited to 255 characters, and the cached methods aren't stale.Question 10
An ISV ships a custom metadata type whose records are protected, in a managed package. Which two statements are true in a subscriber org? Choose 2.
Select 2 answers.
The answer: The right answers are C and E. Protected records can be read by code in the same managed package as the records or their type, and the developer changes them through package upgrades (or the Metadata Apex classes in the same namespace). Subscribers can't read or modify them, hidden records are unavailable to SOQL, the APIs and Setup, and subscribers can't create records of a protected type.
Choose an answer, then check it. Your score shows here.
Want the rest?
The full package has 318 questions across every exam domain, timed exams at the real length, a study guide, flashcards and a readiness check. The Advanced Developer Fundamentals chapter and the readiness check are free to try.
Or Lifetime Access: $79 once for every certification on ForceDigest.
Searching for Plat-Dev-301 dumps? They are copies of real exam questions, which breaks Salesforce's exam rules and can cost you the certification. Why practice questions are the safer way, and the Plat-Dev-301 exam guide for its sections and weights.
Preparing for another exam? Free practice questions for every certification.