is live. Lifetime & Yearly plans on offer. thankful for you ๐Ÿงก

Get the Black Friday deal

Blog

Platform Developer II Study Guide: What to Know Beyond PD1

What to study for Platform Developer II beyond PD1: Apex sharing, async, integration, testing, LWC and performance, organized as a study plan.

By Teja, ex-Salesforce engineer ยท Updated November 24, 2026 ยท 11 min read

Salesforce Platform Developer 2 Study Guide: What to Know Beyond PD1

To prepare for Platform Developer II, study five areas: advanced Apex fundamentals (sharing, security, localization, custom metadata), automation and integration (trigger design, async Apex, Platform Events, callouts and Apex REST services), user interface (LWC, Aura, Visualforce), testing, debugging and deployment, and performance at scale. PD1 checks whether you know what a feature does. PD2 gives you a scenario and asks which design holds up under governor limits, sharing rules and transaction boundaries.

This guide explains the concepts and shows where to practise them. It does not drill exam questions, and Salesforce Casts doesn't either. Use it alongside the official PD2 exam guide and the Trailhead trailmix, which list the current objectives.

PD2 at a glance

These details come from the most recently published exam guide. Salesforce revises certification exams, so check the official page before you book.

ItemDetail
PrerequisiteSalesforce Certified Platform Developer I
Format60 scored multiple-choice/multiple-select questions (plus a few unscored ones)
Time120 minutes
Passing score70%
FeeUSD 200, retake USD 100 (plus local taxes)
DeliveryProctored, online or at a test centre

Older blog posts describe a programming assignment and superbadge requirements. Salesforce has changed the PD2 requirements more than once, so trust the current exam page over any third-party summary, this one included.

How PD2 builds on PD1

Most PD2 topics also appear in PD1. The difference is depth. PD1 asks you to recognize a tool. PD2 asks you to choose between two tools that both work, and to explain why one of them breaks at 200 records or under a restricted user.

TopicWhat PD1 expectsWhat PD2 adds
TriggersTrigger context variables, before vs afterHandler frameworks, recursion control, order of execution with Flows and validation rules
Async ApexKnowing @future and Batch existChoosing between Future, Queueable, Batch and Schedulable; chaining; Database.Stateful; Transaction Finalizers
Securitywith sharing keywordinherited sharing, Apex managed sharing, WITH USER_MODE, Security.stripInaccessible, SOQL injection
IntegrationBasic idea of calloutsNamed and External Credentials, @RestResource, Platform Events, Continuation, mocking callouts
UIBasic LWC and VisualforceLDS vs Apex, wire vs imperative, cache invalidation, LMS, view state, Aura interop
Testing75% coverage, @isTestAsync tests, System.runAs, callout mocks, Stub API, Jest for LWC
PerformanceAvoid SOQL in loopsSelective queries, indexes, Query Plan tool, large data volumes, heap and CPU limits

Exam domains and where to practise

The published outline splits PD2 into five sections. The weights below are from the latest guide we have seen. Use them to decide how much time each area gets.

DomainWeightHands-on practice on Salesforce Casts
Advanced Developer Fundamentals15%Salesforce Development (Visualforce & Apex)
Process Automation, Logic, and Integration27%Apex Triggers Framework 101 (free), Integration Master Course, Learn Lightning Flows with Me
User Interface20%Lightning Web Components Development, Salesforce Development (Visualforce & Apex)
Testing, Debugging, and Deployment22%Apex Test Fest
Performance16%Salesforce Development (Visualforce & Apex), Integration Master Course (Bulk API 2.0)

Advanced developer fundamentals

This domain covers code that checks the running user's access, handles their currency and locale, and keeps configuration out of Apex.

Sharing and security in Apex. Know the three sharing declarations and what happens when a class has none. inherited sharing runs in the caller's mode, and that makes it the safe default for selector and service classes. Then go a level deeper:

  • Apex managed sharing: inserting AccountShare or MyObject__Share rows with a custom RowCause, and why those rows survive an owner change while manual shares don't.
  • Field and object security: WITH USER_MODE in SOQL, Database.insert(records, AccessLevel.USER_MODE), and Security.stripInaccessible() when you need to drop fields instead of throwing an error.
  • SOQL injection: bind variables, Database.queryWithBinds(), and String.escapeSingleQuotes() for dynamic queries.
public inherited sharing class AccountSelector {
    public static List<Account> byIndustry(String industry) {
        return [
            SELECT Id, Name, AnnualRevenue
            FROM Account
            WHERE Industry = :industry
            WITH USER_MODE
        ];
    }
}

Localization and multi-currency. Expect questions on convertCurrency() and FORMAT() in SOQL, toLabel() for translated picklist values, and custom labels for UI text.

Configuration storage. Know when to use custom metadata types, hierarchy or list custom settings, and custom labels. Custom metadata deploys with your code and can be queried without counting against SOQL limits in most cases. Hierarchy custom settings vary by user or profile. Questions often hinge on that difference.

Process automation, logic and integration

This is the heaviest domain, and it's where most PD1 holders lose marks.

Trigger design. Learn one handler pattern well: one trigger per object, logic in a handler class, a guard against recursion, and a way to bypass the handler during data loads. Know the order of execution well enough to say whether a before-save Flow, a validation rule or your before trigger runs first. The free Apex Triggers Framework 101 course (8 episodes, about half an hour) builds this pattern from scratch.

Choosing the right async tool. Most scenario questions come down to this decision:

NeedBest fitWhy
Fire-and-forget callout from a triggerQueueable with Database.AllowsCallouts (or @future(callout=true))Triggers can't make synchronous callouts
Pass sObjects or complex types to async codeQueueable@future accepts only primitives
Process millions of recordsBatch ApexEach execute gets fresh governor limits
Keep running totals across batchesBatch with Database.StatefulInstance variables persist between chunks
Run nightlySchedulable that launches a BatchKeeps scheduling separate from processing
React when a Queueable failsTransaction FinalizerRuns after the job, success or failure

Mixed DML. Inserting a User or PermissionSetAssignment and a non-setup record in the same transaction throws MIXED_DML_OPERATION. In production code, move one of them to async. In tests, wrap one of them in System.runAs.

Transaction control. Know Database.setSavepoint() and rollback(), partial success with allOrNone = false, reading Database.SaveResult errors, and custom exception classes.

Integration. Study outbound and inbound patterns:

  • Outbound: HttpRequest with Named Credentials and External Credentials so endpoints and secrets stay out of code, OAuth flows behind them, and JWT bearer for server-to-server.
  • Inbound: @RestResource classes with @HttpGet/@HttpPost, and when to use the standard REST API instead.
  • Event-driven: publishing Platform Events with EventBus.publish(), subscribing with after-insert triggers on the event, and the difference between "publish immediately" and "publish after commit".
  • Long-running callouts from the UI: the Continuation class.

Flow and Apex together. @InvocableMethod and @InvocableVariable are how admins call your code from Flow, and PD2 expects you to write them in bulk-safe form (they receive a list).

The Integration Master Course is the largest course in the Casts catalogue. It covers OAuth, connected apps, Named and External Credentials, JWT, REST in Apex, Platform Events and Bulk API 2.0, which lines up closely with this domain.

User interface

PD2 assumes you can build an LWC. It tests whether you can pick the right data access pattern and keep the UI in sync.

LWC data access. Use Lightning Data Service (lightning-record-form, getRecord, updateRecord) when it's enough, since it respects sharing and caches for you. Use Apex when you need queries LDS can't express. Know:

  • @wire vs imperative calls, and why wired Apex must be @AuraEnabled(cacheable=true) (cacheable methods can't perform DML).
  • refreshApex() for wired results, and notifyRecordUpdateAvailable() to tell LDS that Apex changed a record.
  • Passing complex types from JavaScript to Apex.

Component communication. Custom events (with bubbles and composed and what each one does), public @api properties and methods for parent-to-child calls, and Lightning Message Service for components that don't share a DOM tree, including Visualforce and Aura.

Aura and Visualforce. These still appear. Know how to embed an LWC inside Aura, navigate between them, and in Visualforce: controller extensions, StandardSetController for pagination, the transient keyword to cut view state, and JavaScript remoting.

The Lightning Web Components Development course covers the LWC side. If your JavaScript is rusty, the free JavaScript for Lightning Web Components course (22 episodes, 2.6 hours) is a faster start. For Visualforce and controller patterns, the Salesforce Development (Visualforce & Apex) course goes through them in a live org.

Testing, debugging and deployment

At 22%, this is the second-heaviest domain. PD2 testing questions are about isolating behaviour. Coverage alone won't earn marks.

What to know:

  • Test.startTest() and Test.stopTest() force queued async work (Queueable, Future, Batch) to finish, so your assertions see the result.
  • @TestSetup for shared data, and why SeeAllData=true is a red flag.
  • HttpCalloutMock, StaticResourceCalloutMock, MultiStaticResourceCalloutMock and WebServiceMock for SOAP.
  • System.runAs() to test sharing and to get around mixed DML in tests.
  • Test.getEventBus().deliver() for Platform Event subscribers.
  • The Stub API (System.StubProvider) for mocking dependencies without DML.
  • The Assert class (Assert.areEqual, Assert.isTrue, Assert.fail) for clearer failures.
  • Jest for LWC unit tests.
@IsTest
private class ErpSyncJobTest {
    @IsTest
    static void marksAccountSyncedAfterCallout() {
        Account acc = new Account(Name = 'Acme');
        insert acc;

        Test.setMock(HttpCalloutMock.class, new ErpMock(200));

        Test.startTest();
        System.enqueueJob(new ErpSyncJob(acc.Id));
        Test.stopTest();

        Account result = [SELECT Sync_Status__c FROM Account WHERE Id = :acc.Id];
        Assert.areEqual('Synced', result.Sync_Status__c, 'Job should mark the account synced');
    }
}

Debugging. Debug log levels and categories, checkpoints in the Developer Console, the Apex Replay Debugger in VS Code, and reading a log to find which line hit a limit.

Deployment. Salesforce CLI, scratch orgs, source tracking, unlocked packages, and deployment test levels (RunLocalTests, RunSpecifiedTests).

Apex Test Fest covers async tests, System.runAs, the Assert class and callout mocks, which are the four areas PD2 testing questions lean on hardest.

Performance

These questions describe a slow page or a failing job and ask what to change.

  • Query selectivity. Know which fields are indexed by default (Id, Name, OwnerId, lookups, external IDs, unique fields, audit dates), why != and leading % wildcards defeat indexes, and how to read the Query Plan tool.
  • Large data volumes. SOQL for loops to keep heap low, Batch Apex for bulk processing, Bulk API 2.0 for loads, and data skew (one owner or parent with too many children).
  • Governor limits. Use the Limits class to check consumption at runtime. Know the sync vs async limits for heap and CPU.
  • Bulkification. Every trigger and invocable method must handle 200 records without a query or DML inside a loop.
  • UI performance. Cacheable Apex, lazy loading in LWC, and reducing Visualforce view state.

A six-week study plan

This assumes about an hour a day and PD1-level Apex already in hand. Stretch it if any area is new to you.

WeekFocusPractice
1Sharing, security, custom metadata, localizationRewrite one of your selectors with inherited sharing and WITH USER_MODE
2Triggers, order of execution, transaction controlBuild a handler framework with a bypass switch
3Async Apex and Platform EventsQueueable with a Finalizer; Batch with Database.Stateful
4IntegrationNamed Credential callout plus an @RestResource endpoint
5LWC, Aura, VisualforceWired and imperative Apex in one component; LMS across two components
6Testing, debugging, performanceWrite tests for weeks 2-5 with mocks and runAs; check your queries in Query Plan

Spend the last few days on the official exam guide's objectives list. Mark each one green, amber or red, and go back to the red ones in a dev org rather than rereading notes.

How Salesforce Casts fits into PD2 prep

Salesforce Casts courses are taught by Teja, an ex-engineer at Salesforce.com. Everything is built live in a real org, line by line, with no slide decks. That suits PD2, because the exam rewards people who have watched a design fail and know why. Every course has a GitHub repo, so you can deploy the code to your own org and break it on purpose.

Be clear about what it isn't: Salesforce Casts doesn't drill certification exam questions, makes no placement promises, and doesn't run live classes or 1:1 mentoring. Questions go to a private discussion group that comes with every plan. Pair the courses with Trailhead and the official exam guide.

Every plan unlocks every course: $19/month, $149/year, or $249 one-time for lifetime access (โ‚น1,999, โ‚น7,499 and โ‚น12,999 in India). Videos stream only, and there are no refunds, so the free courses are a sensible way to check the teaching style first.

FAQ

Do I need PD1 before studying for PD2?

Yes. Platform Developer I is a prerequisite for the PD2 credential. If you haven't passed it yet, follow the Salesforce Developer Roadmap to cover the foundations first, then come back to this guide.

How long does PD2 preparation take?

With real Apex experience, six to eight weeks of steady practice is a realistic target. If you've never written a Queueable, a REST callout or a mocked test, budget more time for those areas, since they carry about half the exam weight between them.

Does Salesforce Casts provide PD2 practice exams or dumps?

No. Salesforce Casts doesn't drill exam questions. The courses teach the underlying Apex, LWC, integration and testing skills by building them in a live org. Use Trailhead and the official exam guide for the exam objectives.

Is Visualforce still on the PD2 exam?

The published outline still includes Visualforce in the user interface section, alongside LWC and Aura. Expect questions on controller extensions, view state and pagination, so don't skip it even if your projects are LWC-only.

Which Salesforce Casts course matters most for PD2?

The Integration Master Course and Apex Test Fest map to the two domains where PD1 holders are usually weakest: integration and testing. If you're short on time, start with those, then fill gaps with the LWC and Visualforce & Apex courses.

Will I get a certificate from Salesforce Casts?

You get a certificate of completion for Salesforce Casts courses. It isn't a Salesforce certification. PD2 itself is only awarded by Salesforce after you pass the proctored exam.

Next step

Open the official PD2 exam guide, mark your weakest domain, and work through the matching course in your own dev org this week. If triggers are the gap, start with the free Apex Triggers Framework 101 course today.


Notes for you before publishing:

  1. I couldn't check the exam details online. Web search hit its usage limit before it returned anything, so the details in "PD2 at a glance" and the domain weights come from my own knowledge and could be out of date. Those are: 60 questions, 120 minutes, 70% pass mark, USD 200/100 fees, and the 15/27/20/22/16 weights. Check them against the current official PD2 exam guide on Trailhead before you publish.
  2. There was no PD1 preparation article in your page list. You asked me to link it, but I couldn't find its URL, so I linked the Salesforce Developer Roadmap in that spot instead. If the PD1 article exists, replace that link in the first FAQ answer.
  3. Internal links: there are six, which is the top of your 3-6 range. Two of them point to the Apex Triggers Framework page. I named the JavaScript for LWC and Flows courses without linking them to stay within the limit.

Learn it by building it

Every course, every code repository, the discussion group and certificates of completion โ€” one subscription.

Keep me in the loop!

Email me when a new episode is published (promise, I will not spam you)

You're signing up to receive emails from Salesforce Casts