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

    Which statement should be used to allow some of the records in a list of records to be inserted if others fail to be inserted?

    A. Database.insert(records, false)
    B. Database.insert(records, true)
    C. insert records
    D. insert (records, false)

  • Question 412:

    Which statement is true regarding the use of user input as part of a dynamic SOQL query?

    A. Free text input should not be allowed, to avoid SOQL injection
    B. The String.format() method should be used to prevent injection
    C. Quotes should be escaped to protect against SOQL injection
    D. The string should be URL encoded by the input form to prevent errors

  • Question 413:

    A developer has created a solution using the SOAP API for authenticating Communities users. What is needed when issuing the login() Call? (Choose two.)

    A. Organization Id
    B. Session Id
    C. Username and Password
    D. Security Token

  • Question 414:

    Assuming the CreateOneAccount class creates one account and implements the Queuetable interface, which syntax tests the Apex code?

    A. List<Account> accts;System.enqueueJob(new CreateOneAccount());Test.getFlexQueueOrder();System.assertEquals(1, accts.size());
    B. List<Account> accts;Test.startTest();System.enqueueJob(new CreateOneAccount());Test.stopTest();accts = [SELECT Id FROM Account];System.assertEquals(1, accts.size());
    C. List<Account> accts;System.enqueueJob(new CreateOneAccount());Test.startTest();System.assertEquals(1, accts.size());Test.stopTest();
    D. List<Account> accts;System.enqueueJob(new CreateOneAccount());accts = [SELECT Id FROM Account];System.assertEquals(1, accts.size());

  • Question 415:

    An environment has two Apex Triggers: an after-update trigger on Account and an after-update trigger on Contact. The Account after-update trigger fires whenever an Account's address is updated, and it updates every associated Contact with that address. The Contact after-update trigger fires on every edit, and it updates every Campaign Member record related to the Contact with the Contact's state.

    Consider the following: A mass update of 200 Account records' addresses, where each Account has 50 Contacts. Each Contact has 1 Campaign Member. This means there are 10,000 Contact records across the Accounts and 10,000 Campaign Member records across the contacts.

    What will happen when the mass update occurs?

    A. The mass update will fail, since the two triggers fire in the same context, thus exceeding the number of records processed by DML statements.
    B. There will be no error, since each trigger fires within its own context and each trigger does not exceed the limit of the number of records processed by DML| statements.
    C. There will be no error, since the limit on the number of records processed by DML statements is 50,000.
    D. The mass update of Account address will succeed, but the Contact address updates will fail due to exceeding number of records processed by DML statements.

  • Question 416:

    Universal Containers decided to use Salesforce to manage a new hire interview process. A custom object called candidate as created with organization-wide default set to Private. A lookup on the Candidate object sets an employee as an Interviewer.

    What should be used to automatically give Read access to the record when the lookup field is set to the Interviewer user?

    A. The record can be shared using a permission set.
    B. The record can be shared using a sharing rule.
    C. The record cannot be shared with the current setup
    D. The record can be shared an Apex class.

  • Question 417:

    A developer needs to implement a system audit feature that allows users, assigned to a custom profile named "Auditors", to perform searches against the historical records in the Account object. The developer must ensure the search is able to return history records that are between 12 and 24 months old.

    Given the code below, which select statement should be inserted below as a valid way to retrieve the Account History records ranging from 12 to 24 month old?

    A. [SELECT AccountId, CreatedDate, Field, NewValue, OldValueFROM Account__HistoryWHERE CreatedDate > :initialDateAND CreatedDate < :endDateALL ROWS];
    B. [SELECT AccountId, CreatedDate, Field, NewValue, OldValueFROM AccountHistoryWHERE CreatedDate > :initialDateAND CreatedDate < :endDate];
    C. [SELECT AccountId, CreatedDate, Field, NewValue, OldValueFROM Account__HistoryWHERE CreatedDate > :initialDateAND CreatedDate < :endDate];
    D. [SELECT AccountId, CreatedDate, Field, NewValue, OldValueFROM AccountHistoryWHERE CreatedDate > :initialDateAND CreatedDate < :endDateALL ROWS];

  • Question 418:

    Refer to the code segment above.

    When following best prachces for writing Apex triggers, which two lines are wrong or cause for concern? (Choose Two)

    A. Line 6
    B. Line 12
    C. Line 16
    D. Line 20

  • Question 419:

    Universal Container needs to integrate with an external system. Every time an Account record is updated to meet certain criteria, a SOAP message must be sent to a third party end-point with the following information: Name, Industry, AccountNumber, and Rating. The lead developer for the org is considering using Workflow rules instead of Apex triggers to fulfill the above requirements.

    What are three benefits of using Workflow rules as opposed to Apex triggers? (Choose three.)

    A. A SOAP message can send more than 100 notifications
    B. Two-way SSL is supported by including a client certificate
    C. Outbound messages prevent circular changes out-of-the-box
    D. Retry logic for outbound messages is enabled out-of-the-box
    E. Tracking outbound message delivery is enabled out-of-the-box

  • Question 420:

    The test method above tests in Apex trigger that the developer knows will make a lot of queries when a lot of Accounts are simultaneously updated to be customers.

    The test method fails at the Line 20 because of too many SOQL queries.

    What is the correct way to fix this?

    A. Add Test.startTest() before and Test.stopTest() after both Line 7 of the code and Line 20 of the code.
    B. Change the DataFactory class to create fewer Accounts so that the number of queries in the trigger is reduced.
    C. Add Test.startTest() before Line 18 of the code and add Test.stopTest() after line 18 of the code.
    D. Replace most of the Apex Trigger with Process Builder processes to reduce the number of queries in the trigger.

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.