Exam Details

  • Exam Code
    :PDII
  • Exam Name
    :Salesforce Certification for Platform Developer II
  • Certification
    :Salesforce Certifications
  • Vendor
    :Salesforce
  • Total Questions
    :425 Q&As
  • Last Updated
    :Mar 27, 2025

Salesforce Salesforce Certifications PDII Questions & Answers

  • Question 171:

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

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

    A developer creates an application event that has triggered an infinite loop. What may have caused this problem?

    A. The event has multiple handlers registered in the project.

    B. The event handler calls a trigger.

    C. An event is fired ontouchend" and is unhandled.

    D. The event Is fired from a custom renderer.

  • Question 174:

    After a Platform Event is defined in a Salesforce org, events can be published via which two mechanisms? Choose 2 answers

    A. internal Apps can use Outbound Messages

    B. Internal Apps can use Process Builder.

    C. External Apps require a custom Apex web service.

    D. External Apps can use the standard Streaming API.

  • Question 175:

    Universal Containers has a Visualforce page that displays a table every Container_ c being rented by a gives Account.. failing because some of the customers rent over 100,000 containers. What should a developer change about the Visualforce page to help with the page load errors?

    A. Implement pagination with an OffsetController.

    B. Implement pagination with a StandardSetController.

    C. Use lazy loading and a transient List variable.

    D. Use JavaScript remoting with SOQL Offset.

  • Question 176:

    Which scenario requires a developer to use an Apex callout instead of Outbound Messaging?

    A. The callout needs to be asynchronous.

    B. The callout needs to be invoked from a Workflow Rule.

    C. The Target system uses a REST API.

    D. The Target system uses a SOAP API.

  • Question 177:

    A Visualforce Page throws an Attempt to dereference a null object error for a Contact. What change In the controller will fix the error?

    A. Declare a static final Contact at the top of the controller.

    B. Change the setters signature to return a Contact.

    C. Use a condition in the getter to return a new Contact if it is null.

    D. Change the getter's signature to be static Contact.

  • Question 178:

    A company uses Opportunism to track sales to their customers and their org has millions of Opportunities. They want to begging to track revenue over time through a related Revenue object. As part of their initial implementation, they want to perform a one-time seeding of their data by automatically creating and populating Revenue records for Opportunities, based on complex logic. They estimate that roughly 100,000 Opportunities will have revenue records and populated. What is the optimal way to automate this?

    A. Use System.enqueueJob>() to Invoke a Queueable class.

    B. Use System.scheduleJob() to schedule a Database.Scheduleable class.

    C. Use Database.executeBatch() to invoke a Queueable dass.

    D. Use Database.executeBatch() to invoke a Database.Batchable class.

  • Question 179:

    Consider the controller code above that is called from a Lightning component and returns data wrapped in a class.

    Consider the controller code above that is called from a Lightning component and returns data wrapped in a class.

    The developer verified that the Queries return a single record each and there is error handing in the Lightning component, but the component is not getting anything back when calling the controller getSomeData().

    What is wrong?

    A. The member's Name and Option of the class MyDataWrapper should be annotated with @AuraEnabled too.

    B. The member's Name and Option should not be declared public.

    C. The member's Name and Option should not have getter and setter.

    D. Instances of Apex classes such as MyDataWrapper cannot be returned to a Lightning component.

  • Question 180:

    An Apex trigger and Apex class increment a counter, Edit_Count_c, any time that the Case is changed.

    A new process on the case object was just created in production for when a Case is created or updated< since the process was created, they are reports that the Count is being incremented by more than one on Case edit. Which change in the Apex code will fix the problem?

    A. Option A

    B. Option B

    C. Option C

    D. Option D

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.