Salesforce PDII Salesforce Certified Platform Developer II Online Training
Salesforce PDII Online Training
The questions for PDII were last updated at Jan 08,2026.
- Exam Code: PDII
- Exam Name: Salesforce Certified Platform Developer II
- Certification Provider: Salesforce
- Latest update: Jan 08,2026
As part of a new integration, a developer is asked to implement a new custom search functional that is capable of performing unrestricted Queries and can account for all values within a custom picklist field. Type_ c, on the Opportunity object. The search feature must also account for NULL values.
The organization-wide default for the Opportunity object is set to Public Read-Only, and a new custom index has been created for the type_ c, field. There are more than 5 million Opportunity records within the environment, and a considerable amount of the existing records have NULL values for the picklist.
Which technique should the developer implement to maximize performance when querying NULL values?
- A . Create a formula field that substitutes Null values for a sting of text, create an index for the formula field, then use the formula within the where cause.
- B . Perform two SOQL query; one to query Opportunities where Type c _ NULL, and another to query where Type_ c = Null, then join the result set using Apex.
- C . Use a SOSL query to return ALL opportunities that have a value of NULL in any field.
- D . Use the OR operator to combine WHERE Causes to strictly search for each value within the picklist, including Type__ c =NULL.
A company uses a custom-built enterprise resource planning (ERP) system to handle order management. The company wants Sales Reps to know the status of orders so that if a customer calls to ask about their shipment, the Sales Rep can advise the customer about the order’s status and tracking number if it is already shipped.
Which two methods can make this ERP order data visible in Salesforce? Choose 2 answers
- A . Ensure real-time order data is in Salesforce using the Streaming API.
- B . Write a cron job In Salesforce to poll the ERP system for order updates.
- C . Have the ERP system push the data into Salesforce using the SOAP API.
- D . Use Salesforce Connect to view real-time Order data in the ERP system.
AWC wants the real-time inventory reduction for a product to be sent to many of its external systems, including some future systems the company is Currently planning.

What should a develops add to the code at the placeholder to meet these requirement!?
A)
![]()
B)
![]()
C)
![]()
D)
![]()
- A . Option A
- B . Option B
- C . Option C
- D . Option D
A developer created a Lightning web component that uses a lightning-record-edit-form t collect information about Leads. Users complain that they only see one error message at a time about their input when trying to save a Lead record.
complain that they only see one error message at a time about their input when trying to save a Lead record.
What is the recommended approach to perform validations on more than one field, and display multiple error messages simultaneously?
with minimal JavaScript intervention?
- A . Try/catch/finally block
- B . Apex trigger
- C . Validation rules
- D . External JavaScript library
A large company uses Salesforce across several departments. Each department has its own Salesforce Administrator. It was agreed that each Administrator would have their own sandbox in which to test changes. Recently, users notice that fields that were recently added for one department suddenly disappear without warning. Also, Workflows that once sent emails and created tasks no longer do so.
Which two statements are true regarding these issues and resolution? Choose 2 answers
- A . A sandbox should be created to use as a unified testing environment instead of deploying Change Sets directly to production.
- B . Page Layouts should never be deployed via Change Sets, as this causes Workflows and Field-level Security to be reset and fields to disappear.
- C . The administrators are deploying their own Change Sets, thus deleting each other’s fields from the objects in production.
- D . The administrators are deploying their own Change Sets over each other, thus replacing entire Page Layouts and Workflows in Production
A developer is creating a Lightning web component that contains a child component. The property stage is being passed from the parent to the child. The public property is changing, but the setOppList function is not being invoked.

What should the developer change to allow this?
- A . Move the logic from connectedCalIback() to constructor().
- B . Create a custom event from the parent component to set the property.
- C . Move the logic from connectedCallback() nto renderedCallback().
- D . Move the logic to a getter/setter pair.
A developer Is tasked with ensuring that email addresses entered into the system for Contacts and for a Custom Object called Survey_Response__c do not belong to a list of blacklisted domains. The list of blacklisted domains will be stored In a custom object for ease of maintenance by users. Note that the Survey_Response__c object is populated via a custom visualforce page.
What is the optimal way to implement this?
- A . Implement the logic in an Apex trigger on Contact and also implement the logic within the Custom visualforce page controller.
- B . Implement the logic in the Custom Visualforce page controller and call that method from an Apex trigger on Contact.
- C . Implement the logic in a helper class that is called by an Apex trigger on Contact and from the Custom Visualforce page controller.
- D . Implement the logic in a Validation Rule on the Contact and a validation Rule on the Survey_Response__c object.
A developer is trying to decide between creating a Visualforce component or a Lightning component for a custom screen.
Which functionality consideration impacts the final decision?
- A . Does the screen need to be accessible from the lightning Experience UI?
- B . Will the screen make use of a JavaScript framework?
- C . Does the screen need to be rendered as a PDF without using a third-party application?
- D . Will the screen be accessed via a mobile app?
Global with sharing class MyRemoter { public String accountName { get; set; } public static Account account { get; set; } public AccountRemoter(} {} @RemoteAction global static Account getAccount (String acccuntName) { account = [SELECT Id, Name, NumberOfEmployees FROM Account WHERE Name = :accountName]; return account; } } Consider the Apex class above that defines a RemoteAction used on a Visualforce search page.
Which code snippet will assert that the remote action returned the correct Account?
- A . MyRemoter remote = new MyRemoter(); Account a = remote.getAccount ({‘TestAccount’); System.assertEquals, ‘TestAcccunt’, a.Name -;
- B . Account a = MyRemoter.getAccount (‘TestAccount’): System.assertEquals{ ‘TestAccount’, a.Name };
- C . MyRemoter remote = new MyRemoter(‘TestAccount’};
Account a = remote.getAccount {);System.assertEquals(, ‘’TestAccount’, a.Name -; - D . Account a = controller.getAccount(‘TestAccount’); System.assertEquals(, ‘TestAccount’, a.Name } ;
A business requires that every parent record must have a child record. A developer writes an Apex method with two DML statements to insert a parent record and a child record.
A validation rule blocks child records from being created. The method uses a try/catch block to handle the DML exception.
What should the developer do to ensure the parent always has a child record?
- A . Use Database.insert () and set the allorNone parameter to true.
- B . Use addError () on the parent record if an error occurs on the child record.
- C . Set a database savepoint to rollback if there are errors.
- D . Delete the parent record in the catch statement when an error occurs on the child record DML operation.