Salesforce PDII Salesforce Certified Platform Developer II Online Training
Salesforce PDII Online Training
The questions for PDII were last updated at Jan 05,2026.
- Exam Code: PDII
- Exam Name: Salesforce Certified Platform Developer II
- Certification Provider: Salesforce
- Latest update: Jan 05,2026
A developer is writing a Jest for a Lightning web component that conditionally displays child components based on a user’s checkbox selections.
What should the developer do to property test that the correct components display and hide for each scenario?
- A . Reset the DOM after each test with the after Each method.
- B . Add a teardown block to reset the DOM after each test.
- C . Create a new describe block for each test
- D . Create a new jsdom instance for each test
When the sales team views an individual customer record, they need to see recent interactions for the customer. These interactions can be sales orders, phone cats, or Cases. The date range for recent interactions will be recent for every customer record type.
How can this be accomplished?
- A . Use Lightning Flow to read the customer’s record type, and then do a dynamic Query for recent
interactions and display on the View page. - B . Use a Lightning component to query and display interactions based on record type that is passed in using a design: attribute from the Lightning page.
- C . Use batch Apex to query for the most recent interactions when the customer view screen is loaded.
- D . Use a dynamic form on the customer record page to display recent interactions.
The Contact object in an org is configured with workflow rules that trigger field updates.
The fields are not updating, even though the end user expects them to. The developer creates a debug log to troubleshoot the problem.
What should the developer specify in the debug log to see the values of the workflow rule conditions and debug the problem?
- A . INFO level for the Database log category
- B . ERROR level for the Workflow log category
- C . ERROR level for the Database log category
- D . INFO level for the Workflow log category
A developer wants to write a generic Apex method that will compare the Salesforce Name filed between any two object records, for example to compare the Name field of an Account and an Opportunity; or the name of an Account and a Contact.
How should the developer do this?
- A . Use a String.replace( ) method to parse the contents of each Name field.
- B . Invoke a Schema,describe() function to compare the values of each Name field.
- C . Cast each object into an sObject and use sObject.get(Name’) to compare the Name fields.
- D . Use the salesforce metadata API to extract the value of each object and compare the name fields
A developer has working business logic code, but sees the following error in the test class:
You have uncommitted work pending. Please commit or rollback before calling out.
What is a possible solution?
- A . Rewrite the business logic and test classes with ©TestVisible set on the callout.
- B . Set seeAIIData to "true" at the top of the test class, since the code does not fail in practice.
- C . Call support for help with the target endpoint, as it is likely an external code error.
- D . Use test.IsRunningTest() before making the callout to bypass it in test execution.
Universal Containers (UC) has custom Order and Order Line objects that represent orders placed by its customers.
A developer has a new requirement that UC’s external enterprise resource planning (CRP) system placed by its customers. integrate with Salesforce to create orders for existing customers in Salesforce whenever an ERP system.
What should the developer use to create the orders in Salesforce?
- A . Connect API
- B . Change Data Capture API
- C . SObject Tree API
- D . Event Monitoring API
As part of point-to-point integration, a developer must call an external web service which, due to high demand, takes a long time to provide a response. As part of the request, the developer must collect key inputs from the end user before making the callout.
Which two elements should the developer use to implement these business requirements? Choose 2 answers
- A . Apex method that returns a Continuation object
- B . Screen now
- C . Process Builder
- D . Lightning web component
Which two scenarios require an Apex method to be called imperatively from a Lightning web component? Choose 2 answers
- A . Calling a method that makes a web service callout
- B . Calling a method that is not annotated with cacheable=true
- C . Calling a method with the click of a button
- D . Calling a method that is external to the main controller for the Lightning web component
Refer to the code snippet below:

As part of an Integration development effort, a developer is tasked to create an Apex method mat solely relies on the use of foreign identifiers In order to relate new contact records to existing Accounts in Salesforce. The account object contains a field marked as an external ID, the API Name of this field is Legacy_Id_c.
What Is the most efficient way to instantiate the parentAccount: variable on line 02 to ensure the newly created contact is properly related to the Account?
A)
![]()
B)
![]()
C)
![]()
D)
![]()
- A . Option A
- B . Option B
- C . Option C
- D . Option D
Assuming the CreateOneAccount class creates one account and implements the Queuetable interface, which syntax tests the Apex code?
A)

B)

C)

D)

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