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

    A developer notices the execution of all the test methods in a class takes a long time to run, due to the initial setup of all the test data that is needed to perform the tests.

    What should the developer do to speed up test execution?

    A. Define a method that creates test data and annotate with @testSetup.
    B. Define a method that creates test data and annotate with @createData
    C. Reduce the amount of test methods in the class.
    D. Ensure proper usage of test data factory In all test methods.

  • Question 62:

    A company has reference data stored in multiple Custom Metadata records that represent default information for certain address information.

    When a Contact is inserted, the default information should be set on the Contact from the Custom Metadata records.

    What is the optimal way to automate this?

    A. Process Builder
    B. Apex Trigger
    C. Workflow Rule
    D. Visual Flow

  • Question 63:

    A company has a custom component that allows users to search for records of a certain object type by invoking an Apex Controller that returns a list of results based on the user's input, when the search Is completed, a searchComplete event is fired, with the results put in a results attribute of the event. The component is designed to be used within other components and may appear on a single page more than once.

    What is the optimal code that should be added to fire the event when the search has completed?

    A. var evt = component.getEvent("searchComplete");evt.setParams({ results: results });evt.fire();
    B. var evt = $A.get("e.c.searchComplete");evt.setParams({ results: results });evt.fire();
    C. var evt = component.getEvent("searchComplete");evt.set("v.results", results);evt.fire();
    D. var evt = $A.get("e.c.searchComplete");evt.set("v.results", results);evt.fire();

  • Question 64:

    A developer wrote an Apex method to update a list of Contacts and wants to make it available for use by Lightning web components.

    Which annotation should the developer add to the Apex method to achieve this?

    A. @AuraEnabled
    B. @RemoteAction
    C. @RemoteAction(cacheable=true)
    D. @AuraEnable

  • Question 65:

    How can a developer efficiently incorporate multiple JavaScript libraries, such as JQuery and MomenUS, in a Lightning Component?

    A. Implement the libraries in separate helper files.
    B. Use CONs with script attributes
    C. Use JavaScript remoting and script tags.
    D. Join multiple assets from a static resource.

  • Question 66:

    When developing a Lightning web component, which setting displays lightning-layout-items in one column on small devices, such as mobile phones, and in two columns on tablet-size and desktop-size screens?

    A. Set size="12" tablet-device-size="6"
    B. Set size="6" small-device-size="12"
    C. Set size="12" medium-device-size="6"
    D. Set size="12" mobile-device-size="12"

  • Question 67:

    Recently a Salesforce org's integration failed because it exceeded the number of allowed API calls in a 24-hour period. The integration handles a near real-time, complex insertion of data into Salesforce.

    The flow of data is as follows:

    1. The integration looks up Contact records with a given email address and, if found, the integration adds a Task to the first matching Contact it finds.

    2. If a match is not found, the integration looks up Lead records with a given email address and, if found, the integration adds a Task to the first matching Lead it finds.

    3. If a match is not found, the integration will create a Lead and a Task for that newly created Lead.

    What is one way in which the integration can stay near real-time, but not exceed the number of allowed API calls in a 24-hour period?

    A. Use the REST API as well as the SOAP API to effectively double the API calls allowed in a 24-hour period.
    B. write a custom Apex web service that, given an email address, does all of the logic the integration code was doing.
    C. Create several Apex InboundEmailHandlers to accept calls from the third-party system, thus bypassing the API limits.
    D. Create an Inbound Message that, using Flow, can do all of the logic the integration code was doing.

  • Question 68:

    A Visualforce page loads slowly due to the large amount of data it displays. Which strategy can a developer use to improve the performance?

    A. Use the transient keyword for the List variables used in the custom controller.
    B. Use lazy loading to load the data on demand, instead of in the controller's constructor.
    C. Use JavaScript to move data processing to the browser instead of the controller.
    D. Use an <apex:actionPoller> in the page to load all of the data asynchronously.

  • Question 69:

    A developer must create a custom pagination solution. While users navigate through pages, if the data is changed from elsewhere, users should still see the cached results first accessed.

    How can the developer meet these requirements?

    A. Use @Cache annotation
    B. Use a StandardSetController
    C. Use OFFSET in SOQL queries
    D. Use OFFSET WITH CACHE in SOQL queries

  • Question 70:

    A developer created a custom component to display an HTML table. The developer wants to be able to use the component on different Visualforce Pages and specify different header text for the table.

    Which tag should the developer use inside the component?

    A. <apex:variable>
    B. <apex:define>
    C. <apex:param>
    D. <apex:attribute>

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.