Career upgrade: Learn practical AI skills for better jobs and higher pay.
Level up
All Practice Exams

100+ Free Salesforce Platform Developer II Practice Questions

Pass your Salesforce Certified Platform Developer II (PDII) exam on the first try — instant access, no signup required.

✓ No registration✓ No credit card✓ No hidden fees✓ Start practicing immediately
100+ Questions
100% Free
1 / 100
Question 1
Score: 0/0

What is the purpose of System.runAs() in Apex tests?

A
B
C
D
to track
2026 Statistics

Key Facts: Salesforce Platform Developer II Exam

60

Scored Questions

Salesforce exam guide (+ up to 5 non-scored)

120 min

Time Limit

Salesforce exam guide

70%

Passing Score

Salesforce official

$200

Exam Fee

Salesforce pricing (retake $100)

2-4 yrs

Recommended Experience

Salesforce exam guide

PD I

Prerequisite

Platform Developer I credential

The Platform Developer II exam consists of 60 multiple-choice/multiple-select questions plus up to 5 non-scored questions in 120 minutes. The passing score is 70%, registration costs $200 USD with a $100 retake fee, and it requires the Platform Developer I credential. Five domains are tested: Process Automation, Logic, and Integration (27%), User Interface (20%), Testing, Debugging, and Deployment (20%), Performance (18%), and Advanced Developer Fundamentals (15%). The exam is proctored onsite or online via Pearson VUE.

Sample Salesforce Platform Developer II Practice Questions

Try these sample questions to test your Salesforce Platform Developer II exam readiness. Each question includes a detailed explanation. Start the interactive quiz above for the full 100+ question experience with AI tutoring.

1A developer needs to process 10 million records nightly. Which asynchronous Apex pattern is MOST appropriate?
A.@future method
B.Queueable Apex
C.Batch Apex
D.Scheduled Apex
Explanation: Batch Apex is designed specifically for processing large data volumes (up to 50 million records) by dividing them into manageable chunks. It implements the Database.Batchable interface with start(), execute(), and finish() methods. @future and Queueable cannot efficiently handle 10 million records due to governor limits.
2When implementing Database.Stateful in a Batch Apex class, what is the primary effect?
A.The batch job runs faster by parallelizing transactions
B.Instance member variables are preserved across execute() method calls
C.The batch size is automatically increased to 2000
D.The job is automatically retried on failure
Explanation: Implementing Database.Stateful preserves instance member variable values between execute() method invocations. Without it, each execute() call starts with a fresh instance. This is useful for maintaining counters, accumulators, or tracking state across batches, but adds serialization overhead.
3A developer wants to chain asynchronous jobs so that Job B starts after Job A completes. Which approach is BEST?
A.Use @future methods and call one from the other
B.Use Queueable Apex and enqueue Job B in Job A's execute() method
C.Use two separate Scheduled Apex jobs with a 1-minute gap
D.Use Platform Events to trigger Job B
Explanation: Queueable Apex supports job chaining by calling System.enqueueJob() within the execute() method. This creates a sequential chain where the next job starts after the current one completes. @future methods cannot call other @future methods, and Scheduled Apex has minimum 1-hour intervals.
4What is the governor limit for SOQL queries in a synchronous Apex transaction?
A.50
B.100
C.150
D.200
Explanation: Synchronous Apex transactions are limited to 100 SOQL queries. Asynchronous Apex (Batch, Queueable, @future, Scheduled) gets a higher limit of 200 SOQL queries per transaction. Exceeding this limit throws a LimitException.
5A developer needs to expose a custom Apex method as a REST endpoint. Which annotation should be used on the class?
A.@AuraEnabled
B.@RestResource
C.@HttpGet
D.@RemoteAction
Explanation: @RestResource(urlMapping='/myEndpoint/*') is the annotation applied at the class level to expose an Apex class as a REST web service endpoint. Individual methods within the class are then annotated with @HttpGet, @HttpPost, @HttpPut, @HttpPatch, or @HttpDelete.
6When writing a Lightning Web Component (LWC), which decorator exposes a property as a public API that a parent component can set?
A.@track
B.@api
C.@wire
D.@public
Explanation: The @api decorator makes a property or method public, allowing parent components to set the property value or call the method. Properties decorated with @api are reactive — when their value changes, the component re-renders. @track was used in earlier versions for reactive private properties but is now implicit.
7A developer needs to make a callout to an external REST API from within an Apex trigger. What is the correct approach?
A.Make the callout directly in the trigger handler
B.Use an @future(callout=true) method or Queueable with Database.AllowsCallouts
C.Use a SOQL query to the external system
D.Use a workflow rule to trigger the callout
Explanation: Callouts cannot be made from within a trigger context synchronously. The developer must use an asynchronous method such as @future(callout=true) or a Queueable class implementing Database.AllowsCallouts. This ensures the callout runs in a separate transaction after the trigger completes.
8In a Lightning Web Component, how does a child component communicate an event to a parent component?
A.By calling a method on the parent using this.template.parent
B.By dispatching a CustomEvent that the parent handles with an event handler
C.By using @wire to bind to the parent's properties
D.By modifying a shared static variable
Explanation: Child-to-parent communication in LWC uses the standard DOM CustomEvent pattern. The child dispatches a CustomEvent using this.dispatchEvent(new CustomEvent('eventname', { detail: data })). The parent listens using an oneventname handler attribute on the child component tag.
9A developer writes a test class for a Batch Apex class. How should the batch job be tested?
A.Call Database.executeBatch() inside Test.startTest() and Test.stopTest()
B.Call the execute() method directly without Database.executeBatch()
C.Use @isTest(SeeAllData=true) to run against production data
D.Mock the batch execution with a stub class
Explanation: The correct approach is to call Database.executeBatch() between Test.startTest() and Test.stopTest(). Test.stopTest() forces the asynchronous batch to execute synchronously within the test context, allowing assertions to verify the results. Test data should be created in the test setup, not from production.
10Which design pattern is recommended for trigger implementation on the Salesforce platform?
A.Multiple triggers per object with inline logic
B.One trigger per object that delegates to a handler class
C.Triggers with recursive logic and no governor limit checks
D.Anonymous blocks instead of triggers
Explanation: The best practice is one trigger per object that delegates all logic to a handler class. This provides separation of concerns, makes the code testable, prevents execution order issues from multiple triggers, and allows the handler to contain logic for bulk operations and recursion prevention.

About the Salesforce Platform Developer II Exam

The Salesforce Certified Platform Developer II validates advanced programmatic capabilities on the Lightning Platform including design patterns, complex business logic, integration, performance optimization, and testing strategies. Candidates typically have 2-4 years of hands-on Salesforce development experience and must hold the Platform Developer I credential as a prerequisite.

Questions

60 scored questions

Time Limit

2 hours (120 minutes)

Passing Score

70%

Exam Fee

$200 (Salesforce / Pearson VUE)

Salesforce Platform Developer II Exam Content Outline

27%

Process Automation, Logic, and Integration

Asynchronous Apex (Batch, Queueable, Future, Scheduled), Platform Events, REST/SOAP services, callouts, and flow integration

20%

User Interface

Lightning Web Components, Aura, Visualforce, component communication, lifecycle hooks, and responsive design

20%

Testing, Debugging, and Deployment

Apex test strategies, mock frameworks, negative testing, deployment tools, Salesforce DX, and CI/CD practices

18%

Performance

Governor limits optimization, SOQL tuning, bulkification, caching, large data volumes, and heap management

15%

Advanced Developer Fundamentals

Design patterns, sharing model, dynamic Apex, custom metadata, multi-currency, and security enforcement

How to Pass the Salesforce Platform Developer II Exam

What You Need to Know

  • Passing score: 70%
  • Exam length: 60 questions
  • Time limit: 2 hours (120 minutes)
  • Exam fee: $200

Keys to Passing

  • Complete 500+ practice questions
  • Score 80%+ consistently before scheduling
  • Focus on highest-weighted sections
  • Use our AI tutor for tough concepts

Salesforce Platform Developer II Study Tips from Top Performers

1Master all four async Apex patterns (Batch, Queueable, Future, Scheduled) — know when to use each and their governor limit differences
2Practice LWC component communication: @api for parent-to-child, CustomEvent for child-to-parent, LMS for siblings
3Know the trigger execution order thoroughly — before triggers, validation rules, after triggers, and automation sequence
4Write meaningful tests with assertions, negative tests, and bulk tests (200+ records) — not just code coverage
5Understand design patterns: Singleton, Selector, Service Layer, Unit of Work, and trigger handler patterns
6Practice debugging with Developer Console timeline views and reading governor limit usage via the Limits class

Frequently Asked Questions

What is the passing score for Salesforce Platform Developer II?

The passing score is 70%. The exam has 60 scored multiple-choice/multiple-select questions plus up to 5 non-scored questions. You have 120 minutes to complete it.

What are the prerequisites for Platform Developer II?

You must hold the Salesforce Certified Platform Developer I credential. Salesforce recommends 2-4 years of hands-on development experience with at least one year of Lightning Platform design and implementation.

How much does the Salesforce PDII exam cost?

Registration is $200 USD plus applicable local taxes. The retake fee is $100 USD. The exam is available onsite at Pearson VUE testing centers or online with proctoring.

What is the highest-weighted domain on the PDII exam?

Process Automation, Logic, and Integration is the highest-weighted domain at 27%. Focus on asynchronous Apex patterns (Batch, Queueable, Future, Scheduled), Platform Events, callouts, and invocable methods.

How long is the PDII certification valid?

The certification is valid for 3 years from the date you pass. You need to maintain it through continuing education (Trailhead maintenance modules) or retake the exam.

How should I prepare for the Platform Developer II exam?

Focus on design patterns, async Apex (all four types), LWC lifecycle and communication patterns, governor limit optimization, and test strategies including mocks. Hands-on practice in a scratch org is essential.