PDII Exam Details

  • Exam Code
    :PDII
  • Exam Name
    :Salesforce Certified Platform Developer II (Plat-Dev-301)
  • Certification
    :Salesforce Certifications
  • Vendor
    :Salesforce
  • Total Questions
    :445 Q&As
  • Last Updated
    :Jul 14, 2026

Salesforce PDII Online Questions & Answers

  • Question 1:

    Which two scenarios require an Apex method to be called imperatively from a Lightning web component? (Choose Two)

    A. Calling a method that makes a web service callout
    B. Calling a method that is not annotated with cacheable=true
    C. Calling a method with the click of a button
    D. Calling a method that is external to the main controller for the Lightning web component

  • Question 2:

    An org has a custom object, Part__c. Its records are regularly imported from the company's Enterprise Resource Planning (ERP) system.

    What can be used to ensure the correct Part__c records are updated in Salesforce when imports are made?

    A. A Formula field
    B. An External ID field
    C. A Master-detail field
    D. A Lookup field

  • Question 3:

    Universal Containers needs to integrate with an external system. The process is initiated when a record is created in Salesforce. The remote system does not require Salesforce to wait for a response before continuing.

    What should the developer use to accomplish this?

    A. Trigger with HTTP callout
    B. PushTopic event
    C. Outbound message
    D. Platform event

  • Question 4:

    A Salesforce developer is hired by a multi-national company to build a custom Lightning application that shows employees their employment benefits and earned commissions over time. The application must acknowledge and respect the user's locale context for dates, times, numbers, currency, and currency symbols.

    Which approach should the developer implement to ensure the Lightning application complies with the user's locale?

    A. Create a Hierarchical custom setting to store user preferences
    B. Use the $Locale value provider to retrieve the user preferences
    C. Use the $User global variable to retrieve the user preferences
    D. Use the $Label global value provider.

  • Question 5:

    An org has a requirement that addresses on Contacts and Accounts should be normalized to a company standard by Apex code any time that they are saved.

    What is the optimal way to implement this?

    A. Apex trigger on Account that calls the Contact trigger to normalize the address
    B. Apex trigger on Contact that calls the Account trigger to normalize the address
    C. Apex trigger on Account that and Account that normalized the address
    D. Apex trigger on Account and Account that call a helper class to normalize the address

  • Question 6:

    If a developer wanted to display error messages with the standard Salesforce Ul styling, what would they use?

    A. <apex:pageMessages>
    B. <apex:message>
    C. <apex:outputText>
    D. <apex:error>

  • Question 7:

    A company decides that every time an Opportunity is created, they want to create a follow up Task and assign it to the Opportunity Owner.

    What should a developer use to implement the requirements?

    A. A Process Builder on Opportunity
    B. A trigger on Task
    C. A trigger on Opportunity
    D. A Process Builder on Task

  • Question 8:

    Consider the following code snippet:

    private class with sharing AccountsController_Test {

    @TestSetup private static void makeData() { User user1 = [ SELECT Id FROM User WHERE Profile.Name = 'System Administrator' AND IsActive = true LIMIT 1 ];

    User user2 = [ SELECT Id FROM User WHERE Profile.Name = 'Standard User' AND Username = '[email protected]' AND IsActive = true LIMIT 1 ];

    TestUtils.insertAccounts(10, user1.Id);

    TestUtils.insertAccounts(20, user2.Id);

    }

    @IsTest private static void getAllAccounts_StandardUser_Test() {

    }

    }

    As part of the deployment cycle, a developer creates the following test class. When the test class runs, the assertion fails.

    Which change should the developer implement in the Apex test method to ensure the test method executes successfully?

    A. Query the Standard User into memory and enclose lines 14 and 15 within the System.runAs(user) method.
    B. Add System.runAs(user) to line 14 and enclose line 14 within Test.startTest() and Test.stopTest().
    C. Query the Administrator user into memory and enclose lines 14 and 15 within the System.runAs(user) method.
    D. Add @IsTest(seeAllData=true) to line 12 and enclose lines 14 and 15 within Test.startTest() and Test.stopTest().

  • Question 9:

    global with sharing class MyRemoter { public String accountName { get; set; } public static Account account { get; set; } public AccountRemoter() {}

    @RemoteAction global static Account getAccount(String accountName) { account = [SELECT Id, Name, NumberOfEmployees FROM Account WHERE Name = :accountName];

    return account;

    }

    }

    Consider the Apex class above that defines a RemoteAction used on a Visualforce search page.

    Which code snippet will assert that the remote action returned the correct Account?

    A. Account a = controller.getAccount('TestAccount');System.assertEquals( 'TestAccount', a.Name );
    B. MyRemoter remote = new MyRemoter();Account a = remote.getAccount('TestAccount');System.assertEquals( 'TestAccount', a.Name );
    C. MyRemoter remote = new MyRemoter();Account a = remote.getAccount('TestAccount');System.assertEquals( 'TestAccount', a.Name );
    D. Account a = MyRemoter.getAccount('TestAccount');System.assertEquals( 'TestAccount', a.Name );

  • Question 10:

    There are user complaints about slow render times of a custom data table within a Visualforce page that loads thousands of Account records at once.

    What can a developer do to help alleviate such issues?

    A. Use the standard Account List controller and implement pagination.
    B. Use JavaScript remoting to query the accounts.
    C. Use the transient keyword in the Apex code when querying the Account records.
    D. Upload a third-party data table library as a static resource.

Tips on How to Prepare for the Exams

Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Salesforce exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your PDII exam preparations and Salesforce certification application, do not hesitate to visit our Vcedump.com to find your solutions here.