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
    :Jun 19, 2026

Salesforce PDII Online Questions & Answers

  • Question 351:

    A company uses an external system to manage its custom account territory assignments. Every quarter, millions of Accounts may be updated in Salesforce with new Owners when the territory assignments are completed in the external system.

    What is the optimal way to update the Accounts from the external system?

    A. Apex REST Web Service
    B. Composite REST API
    C. SOAP API
    D. Bulk API

  • Question 352:

    A developer wrote a trigger on Opportunity that will update a custom Last Sold Date field on the Opportunity's Account whenever an Opportunity is closed. In the test class for the trigger, the assertion to validate the Last Sold Date field fails.

    What might be causing the failed assertion?

    A. The test class has not defined an Account owner when inserting the test data.
    B. The test class has not re-queried the Account record after updating the Opportunity.
    C. The test class has not implemented seeAIIData-truwh the test method.
    D. The test class is not using System.runAs() to run tests as a Salesforce administrator.

  • Question 353:

    What is the correct syntax for calling a controller action from a Visualforce page and updating part of the page once the action is completed? (Choose two.)

    A. <apex:commandFunction action="{!Save}" value="Save" rendered="thePageBlock"/>
    B. <apex:actionFunction action="{!Save}" name="Save" rerender="thePageBlock"/>
    C. <apex:commandButton action="{!Save}" value="Save" redraw="thePageBlock"/>
    D. <apex:actionSupport action="{!Save} " event="onchange" rerender="thePageBlock"/>

  • Question 354:

    What are the ways a developer can create test data of Contacts? (Choose two.)

    A. Test.createTestData()
    B. myDataFactory.createContacts(10)
    C. Test.loadData(Contact.sObjectType, 'staticResource')
    D. Test.loadTestRecords(Contact.sObjectType, 'staticResource')

  • Question 355:

    A company has many different unit test methods that create Account records as part of their data setup. A new required field was added to the Account and now all of the unit tests fail.

    What is the optimal way for a developer to fix the issue?

    A. Add the required field to the data setup for all of the unit tests.
    B. Add a before insert trigger on Account to set the value of the required field.
    C. Create a TestDataFactory class that serves as the single place to create Accounts for unit tests and set the required field there.
    D. Change the required field to be a validation rule that excludes the System Administrator profile.

  • Question 356:

    A developer is asked to update data in an org based on new business rules. The new rules state that Accounts with the type set to 'Customer' should have a status of 'Active,' and Accounts with the type set to 'Prospect' should have a status of 'Pending.' No other changes to data should be made.

    Which code block will accurately meet the business requirements?

    A. Option A
    B. Option B
    C. Option C
    D. Option D

  • Question 357:

    An integration user makes a successful login() call via the SOAP API. What can be used in the SOAP header to provide server authorization for subsequent API requests?

    A. Named Credentials
    B. Session ID
    C. OAuth access token
    D. Security token

  • Question 358:

    As part of their quoting and ordering process, a company needs to send PDFs to their document storage system's REST endpoint that supports OAuth 2.0. Each Salesforce user must be individually authenticated with the document storage system to send the PDF.

    What is the optimal way for a developer to implement the authentication to the REST endpoint?

    A. Named Credential with an OAuth Authentication Provider
    B. Hierarchy Custom Setting with a password custom field
    C. Named Credential with Password Authentication
    D. Hierarchy Custom Setting with an OAuth token custom field

  • Question 359:

    Which technique can run custom logic when an Aura Component is loaded?

    A. Use an aura:handler "init" event to call a function.
    B. Use the connectedCallback() method.
    C. Use the standard doInit function in the controller.
    D. Call $A.enqueueAction passing in the method to call.

  • Question 360:

    Which code snippet represents the optimal Apex trigger logic for assigning a Lead's Region based on its PostalCode, using a custom Region__c object?

    A. Set<String> zips = new Set<String>();for (Lead l : Trigger.new) {if (l.PostalCode != null) {zips.add(l.PostalCode);}}List<Region__c> regions = [SELECT Zip_Code__c, Region_Name__cFROM Region__cWHERE Zip_Code__c IN :zips];Map<String, String> zipMap = new Map<String, String>();for (Region__c r : regions) {zipMap.put(r.Zip_Code__c, r.Region_Name__c);}for (Lead l : Trigger.new) {if (l.PostalCode != null) {Region__c = zipMap.get(l.PostalCode);}}
    B. Set<String> zips = new Set<String>();for (Lead l : Trigger.new) {if (l.PostalCode != null) {zips.add(l.PostalCode);}}for (Lead l : Trigger.new) {List<Region__c> regions = [SELECT Zip_Code__c, Region_Name__cFROM Region__cWHERE Zip_Code__c IN :zips];for (Region__c r : regions) {if (l.PostalCode == r.Zip_Code__c) {Region__c = r.Region_Name__c;}}
    C. for (Lead l : Trigger.new) {Region__c reg = [SELECT Region_Name__cFROM Region__cWHERE Zip_Code__c = :l.PostalCode];Region__c = reg.Region_Name__c;}
    D. Set<String> zips = new Set<String>();for (Lead l : Trigger.new) {if (l.PostalCode != null) {zips.add(l.PostalCode);}}for (Lead l : Trigger.new) {List<Region__c> regions = [SELECT Zip_Code__c, Region_Name__cFROM Region__cWHERE Zip_Code__c IN :zips];for (Region__c r : regions) {if (l.PostalCode == r.Zip_Code__c) {Region__c = r.Region_Name__c;}}}

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.