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 321:

    A developer migrated functionality from JavaScript demoting to a Lightning web component and wants to use the existing getOpportunities() method to provide data.

    Which modification to the method is necessary?

    A. A The method must be decorated with uraEnabled.
    B. The method must return a JSON Object.
    C. The method must be decorated with (cacheable=true).
    D. The method must return a String of a serialized JSON Array.

  • Question 322:

    A company has a custom object, Order__c, that has a required, unique, external ID field called Order_Number__c. Which statement should be used to perform the DML necessary to insert new records and update existing records in a List of Order__c records?

    A. upsert orders;
    B. merge orders;
    C. merge orders Order_Number__c;
    D. upsert orders Order_Number__c;

  • Question 323:

    Universal Containers uses a custom Lightning page to provide a mechanism to perform a step-by-step wizard search for Accounts. One of the steps in the wizard is to allow the user to input text into a text field, ERP_Number__c, that is then used in a query to find matching Accounts.

    A developer receives the exception 'SOQL query not selective enough.

    Which step should be taken to resolve the issue?

    A. Move the SOQL query to within an asyncronous process.
    B. Mark the ERP_Number__c field as an external ID.
    C. Change the query to use a SOSL statement instead of SOQL.
    D. Mark the ERP_Number__c field as required.

  • Question 324:

    What is the transaction limit on the max Salesforce CPU time?

    A. 100 seconds
    B. 60 seconds
    C. 100 seconds (synchronous); 200 seconds (async)
    D. 10 seconds (synchronous); 60 seconds (async)
    E. There is no limit

  • Question 325:

    Exhibit:

    trigger ContactTrigger on Contact (before insert) { List<Id> accountIds = new List<Id>();

    for (Contact c : Trigger.new) { accountIds.add(c.AccountId);

    }

    for (Account a : [ SELECT Id, Industry FROM Account WHERE Id IN :accountIds ]) {

    for (Contact c : Trigger.new) {

    if (c.AccountId == a.Id) { ContactUtil.setDefaultsOnContact(c, a);

    }

    }

    }

    }

    What can be done to improve the performance of the insert trigger shown above?

    A. for (Contact c : Trigger.new) {ContactUtil.setDefaultsOnContact(c, c.Account);}
    B. Map<Id, Contact> conMap = new Map<Id, Contact>([SELECT Id, Account.IndustryFROM ContactWHERE Id IN :Trigger.newMap.keySet()]);for (Contact c : Trigger.new) {ContactUtil.setDefaultsOnContact(c, conMap.get(c.Id).Account);}
    C. Map<Id, Account> acctMap = new Map<Id, Account>([SELECT Id, IndustryFROM AccountWHERE Id IN :accountIds]);for (Contact c : Trigger.new) {ContactUtil.setDefaultsOnContact(acctMap.get(c.AccountId));}
    D. Map<Id, Contact> conMap = new Map<Id, Contact>([SELECT Id, Account.IndustryFROM ContactWHERE AccountId IN :accountIds]);for (Contact c : Trigger.new) {ContactUtil.setDefaultsOnContact(c, conMap.get(c.Id).Account);}

  • Question 326:

    A customer has a single Visualforce page that allows each user to input up to 1500 sales forecasts and instantly view pivoted forecast calculations. Users are complaining that the page is loading slowly, and they are seeing error messages regarding heap and view state limits.

    What are three recommendations to optimize page performance? (Choose three.)

    A. Segregate calculation functionality from input functionality
    B. Specify the list of sales forecasts as transient
    C. Implement pagination and reduce records per page
    D. Create formula fields to compute pivoted forecast calculations
    E. Use JavaScript Remoting instead of controller actions

  • Question 327:

    Universal Containers wants to use a Customer Community with Customer Community Plus licenses so their customers can track how many of containers they are renting and when they are due back. Many of their customers are global companies with complex Account hierarchies, representing various departments within the same organization. One of the requirements is that certain community users within the same Account hierarchy be able to see several departments' containers, based on a junction object that relates the Contact to the various Account records that represent the departments.

    Which solution solves these requirements?

    A. A Lightning web component on the Community Home Page that uses Lightning Data Services.
    B. An Apex Trigger that creates Apex Managed Sharing records based on the junction object's relationships
    C. A Custom List View on the junction object with filters that will show the proper records based on owner
    D. A Visualforce page that uses a Custom Controller that specifies without sharing to expose the records

  • Question 328:

    A company requires an external system to be notified whenever an account is updated.

    trigger AccountTrigger on Account (after update) {

    for (Account updatedAccount : Trigger.new) { AccountTriggerHelper.notinyxternalSystem(updatedAccount.Id);

    }

    }

    public class AccountTriggerHelper {

    @future(callout=true) public static void notinyxternalSystem(Id accountId) { Account acc = [ SELECT Id, Name FROM Account WHERE Id = :accountId ];

    Http h = new Http();

    HttpRequest req = new HttpRequest();

    req.setEndpoint('http://example.org/restService');

    req.setMethod('POST');

    req.setBody(JSON.serialize(acc));

    HttpResponse res = h.send(req);

    }

    }

    What LimitException could the following code trigger?

    A. System.LimitException: Too many future calls
    B. System.LimitException: Too many callouts
    C. System.LimitException: Too many SOQL queries
    D. System.CalloutException: Callout from triggers are currently not supported

  • Question 329:

    A developer needs a Lightning web component to display in one column on phones and two columns on tablets/desktops. Which should the developer add to the code?

    A. Add size="12" medium-device-size="6" to the <lightning-layout-item> elements
    B. Add size="6" small-device-size="12" to the <lightning-layout-item> elements
    C. Add small-device-size="12" to the <lightning-layout-item> elements
    D. Add medium-device-size="6" to the <lightning-layout-item> elements

  • Question 330:

    A company has a native iOS app for placing orders that needs to connect to Salesforce to retrieve consolidated information from many different objects in a JSON format.

    Which is the optimal method to implement this in Salesforce?

    A. Apex SOAP Callout
    B. Apex REST Callout
    C. Apex SOAP Web Service
    D. Apex REST Web Service

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.