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

    Which technique can run custom logic when a Lightning web component is loaded?

    A. Use an <aura:handler> init event to call a function.
    B. Use the connectedCallback() method.
    C. Use the renderedCallback() method.
    D. Call $A.enqueueAction and pass in the method to call.

  • Question 232:

    An Apex trigger creates an Order__c record every time an Opportunity is won by a Sales Rep. Recently the trigger is creating two orders. What is the optimal method for a developer to troubleshoot this?

    A. Run the Apex Test Classes for the Apex trigger to ensure the code still has sufficient code coverage.
    B. Turn off all Workflow Rules, then turn them on one at time to see which one causes the error.
    C. Add system.debug() statements to the code and use the Developer Console logs to trace the code.
    D. Set up debug logging for every Sales Rep, then monitor the logs for errors and exceptions.

  • Question 233:

    A developer wrote the following method to find all the test accounts in the org:

    What should be used to fix this falling test?

    A. Test.loadData to set up expected data
    B. Test.setFixedSearchResults() method to set up expected data
    C. @isTest (See AllData=true) to access org data for the test
    D. @testSetup method to set up expected data

  • Question 234:

    A developer is writing a Visualforce page that queries accounts in the system and presents a data table with the results. The users want to be able to filter the results based on up to five fields. However, the users want to pick the five fields to use as filter fields when they run the page.

    Which feature of Apex code is required to facilitate this solution?

    A. REST API
    B. Dynamic SOQL
    C. describeSObjects()
    D. SOSL queries

  • Question 235:

    What are two benefits of using External IDs? (Choose Two)

    A. An External ID is indexed and can improve the performance of SOQL queries.
    B. An External ID field can be used to reference a unique ID from another, external system.
    C. An External ID can be a formula field to help create a unique key from two fields in Salesforce.
    D. An External ID can be used with Salesforce Mobile to make external data visible.

  • Question 236:

    An Apex trigger and an Apex class increment a counter field, Edit_Count__c, each time a Case record is updated.

    public class CaseTriggerHandler { public static void handle(List<Case> cases) {

    for (Case c : cases) {

    A. Edit_Count__c = c.Edit_Count__c + 1;}}}trigger CaseTrigger on Case (before update) {CaseTriggerHandler.handle(Trigger.new);}A new before-save record-triggered Flow on the Case object has recently been created in production. The Flow runs when a Case is created or updated. Since the Flow was added, users report that Edit_Count__c is being incremented more than once during a single Case edit.Which Apex code change will fix this problem?
    B. trigger CaseTrigger on Case (before update) {Boolean firstRun = true;if (firstRun) {CaseTriggerHandler.handle(Trigger.newMap);}firstRun = false;}
    C. public class CaseTriggerHandler {public static Boolean firstRun = true;public static void handle(List<Case> cases) {for (Case c : cases) {
    D. Edit_Count__c = c.Edit_Count__c + 1;}}}trigger CaseTrigger on Case (before update) {CaseTriggerHandler.firstRun = true;if (CaseTriggerHandler.firstRun) {CaseTriggerHandler.handle(Trigger.new);}CaseTriggerHandler.firstRun = false;}
    E. public class CaseTriggerHandler {public static Boolean firstRun = true;public static void handle(List<Case> cases) {for (Case c : cases) {
    F. Edit_Count__c = c.Edit_Count__c + 1;}}}trigger CaseTrigger on Case (before update) {CaseTriggerHandler.handle(Trigger.new);}
    G. public class CaseTriggerHandler {public static Boolean firstRun = true;public static void handle(List<Case> cases) {for (Case c : cases) {
    H. Edit_Count__c = c.Edit_Count__c + 1;}}}trigger CaseTrigger on Case (before update) {if (CaseTriggerHandler.firstRun) {CaseTriggerHandler.handle(Trigger.new);}CaseTriggerHandler.firstRun = false;}

  • Question 237:

    A developer is asked to look into an issue where a scheduled Apex is running into DML limits. Upon investigation, the developer finds that the number of records processed by the scheduled Apex has recently increased to more than 10,000.

    What should the developer do to eliminate the limit exception error?

    A. Use the @future annotation.
    B. Implement the Bathable interface.
    C. Use platform events.
    D. Implement the Queueable interface.

  • Question 238:

    What is the optimal syntax for adding a link to a Case in a Visualforce page? (Choose two.)

    A. <apex:outputLink value="{!URLFOR($Action.Case.Open, case)}" target="_blank">{!case.Name}</apex:outputLink>
    B. <apex:outputLink value="/{!case.Id}" target="_blank">{!case.Name}</apex:outputLink>
    C. <apex:outputLink value="{!URLFOR($Action.Case.View, case.Id)}" target="_blank">{!case.Name}</apex:outputLink>
    D. <apex:outputLink value="{!viewCase(case.Id)}" target="_blank">{!case.Name}</apex:outputLink>

  • Question 239:

    The Salesforce instance at Universal Containers currently integrates with a third-party company to validate mailing addresses via REST services. The third-party address verification system recently changed endpoint URLs for all their set vices from https://th-addreaa-service.3pc.com to https://plc1-mailsarvice.3pc.com.

    Everything else remained the same. The developer updated code to reflect this endpoint change, but the mailing address validation service stopped working after the change.

    What else should be done to complete this web service end point change?

    A. Test the callout property using HttpCalloutMock.
    B. Add web service IP Addresses to Trusted IP Ranges m the Network Access security controls settings.
    C. Use a Custom Setting with the new endpoint Instead of hard coding the URL.
    D. Create a new Remote Site for the new endpoint URL.

  • Question 240:

    A developer wrote a test class that successfully asserts a trigger on Account. It fires and updates data correctly in a sandbox environment. A salesforce admin with a custom profile attempts to deploy this trigger via a change set into the production environment, but the test class fails with an insufficient privileges error.

    What should a developer do to fix the problem?

    A. Add system.runAd () to the best class to execute the trigger as a user with the correct object permissions.
    B. Configure the production environment to enable "Run All tests as Admin User".
    C. Verify that Test, statement () is not inside a For loop in the test class.
    D. Add seeAllData=true to the test class to work within the sharing model for the production environment.

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.