Salesforce PDII Salesforce Certified Platform Developer II Online Training
Salesforce PDII Online Training
The questions for PDII were last updated at Jan 04,2026.
- Exam Code: PDII
- Exam Name: Salesforce Certified Platform Developer II
- Certification Provider: Salesforce
- Latest update: Jan 04,2026
A developer created a Lightning web component that allows users to input a text value that is used to search for Accounts by calling an Apex method. The Apex method returns a list of AccountWrappers and is called imperatively from a JavaScript event handler.

Which two changes should the developer make so the Apex method functions correctly? Choose 2 answers
- A . Add @AuraEnafcle3 to line 09.
- B . Add @AuraEnabled to line 03.
- C . Add @AuraEnabled to lines 11 and 12.
- D . Add @AuraEnat:ei to line 01.
A developer created a JavaScript library that simplifies the development of repetitive tasks and features and uploaded the library as a static resource called jsutils in Salesforce. Another developer is coding a new Lightning web component (LWC) and wants to leverage the library.
Which statement properly loads the static resource within the LWC?
- A . import {jsUtilities} from ‘@salesforce/reaourceUrljsUtila’;
- B . import jUtilities from ‘@salesforce/reaourceUrljsUtila’;
- C . <lightning-require scripts=N { ! SReaource. j sUtils}’’/>
- D . const jsUtility = SA.get (‘SReaource.jsUtils’);
Refer to the following code snippets:
MyOpportunities.js

OpportunityController.cIs

A developer is experiencing issues with a Lightning web component. The component must surface information about Opportunities owned by the currently logged-in user
When the component Is rendered, the following message Is displayed: "Error retrieving data".
Which modification should be implemented to the Apex class to overcome the issue7
- A . Ensure the OWD for the Opportunity object is Public.
- B . Use the Cacheable-true attribute in the Apex method.
- C . Edit the code to use the without sharing keyword in the Apex class.
- D . Use the continuation-true attribute in the Apex method.
Part of a custom Lightning Component displays the total number of Opportunities in the org, which is in the millions. The Lightning Component uses an Apex Controller to get the data it needs.
What is the optimal way for a developer to get the total number of Opportunities for the Lightning Component?
- A . SUM() SOQL aggregate query on the Opportunity object
- B . SOQL for loop that counts the number of Opportunities records
- C . COUNT() SOQL aggregate query on the Opportunity object
- D . Apex Batch job that counts the number of Opportunity records
Refer to the test method below:

An external system with Account information and sets the Account’s Integration-Updated___ c checkbox to True when it completes.
The test fails to execute and exits with an error: "Methods defined as TestMethod do not support Web service callouts."
What is the optimal way to fix this?
- A . Add if (‘Test.isRunningTest I)) around calloutUtil.sendAccountUpdate.
- B . Add Test.startTest ()before and Test.stopTest () after CallcutoutUtil. sendAccoutUpdate.
- C . Add Test.startTest before and Test.setMock and Test. stoptest () after CallloutUtil.sendAccountUpdate.
- D . Add Test.startTest() and Test .setMock before and Test.stopTest () after CalloutUtil.sendAccountUpdate.
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 also.
- 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.
A company represents their customers as Accounts in Salesforce. All customers have a unique Customer_Number__c that is unique across all of the company’s systems. They also have a custom Invoice__c object, with a Lookup to Account, to represent invoices that are sent out from their external system. This company wants to integrate invoice data back into Salesforce so Sales Reps can see when a customer is paying their bills on time.
What is the optimal way to implement this?
- A . Use Salesforce Connect and external data objects to seamlessly import the invoice data into Salesforce without custom code.
- B . Ensure Customer_Number__c is an External ID and that a custom field Invoice_Number__c is an External ID and Upsert invoice data nightly.
- C . Create a cross-reference table in the custom invoicing system with the Salesforce Account ID of each Customer and insert invoice data nightly.
- D . Query the Account Object upon each call to insert invoice data to fetch the Salesforce ID corresponding to the Customer Number on the invoice
Which use case can only be performed by using asynchronous Apex?
- A . Scheduling a batch process to complete in the future
- B . Processing high volumes of records
- C . Updating a record after the completion of an insert
- D . Calling a web service from an Apex trigger
What should a developer use to query all Account fields for the Acme account in their sandbox?
- A . SELECT FROM ACCOUNT WHERE Name = ‘Acme’ LIMIT 1
- B . SELECT ALL FROM Account WHERE Name = ‘Acme’ LIMIT 1
- C . SELECT FIELDS FROM Account WHERE Name = ‘Acme’ LIMIT 1
- D . SELECT FIELDS (ALL) FROM Account WHERE Name = ‘Acme’ LIMIT 1
Given the following information regarding Universal Containers (UC):
• UC represents their customers as Accounts in Salesforce
• All customer has a unique Customer-Number- c, that is unique across all of UC’s systems.
• UC also has a custom Invoice_ c object, with a Lookup to Account, to represent invokes that are sent out from their external system
UC wants to integrate invoice data back into Salesforce so Sales Reps can see when a customer pays their bills on time.
What is the optimal way to implement this?
A)

B)

C)

D)

- A . Option A
- B . Option B
- C . Option C
- D . Option D