Salesforce PDII Online Practice
Questions and Exam Preparation
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 391:
Universal Containers uses Salesforce to track orders in an Order__c object. The Order__c object has private organization-wide defaults. The Order__c object has a custom field, Quality_Controller__c, that is a lookup to User and is used to indicate that the specified user is performing quality control on the Order__c.
What should be used to automatically give read-only access to the user set in the Quality_Controller__c field?
A. User-managed sharing B. Record ownership C. Apex-managed sharing D. Criteria-based sharing
C. Apex-managed sharing
Explanation
In Salesforce, when organization-wide defaults (OWD) are set to Private, users only have access to records they own or those shared with them through the role hierarchy or sharing rules. In this scenario, the requirement is to grant access dynamically based on a value in a lookup field (Quality_Controller__c).
Criteria-based sharing rules (Option D) are generally used for field values that are static or belong to a predefined set, but they cannot dynamically target a specific user identified in a lookup field on the record itself.
Apex-managed sharing is the optimal solution for this requirement. It allows developers to programmatically create sharing records to grant access to specific users or groups. When a record is created or the Quality_Controller__c field is updated, an Apex trigger can insert a record into the Order__Share object. This share record would specify the UserOrGroupId as the ID from the lookup field and the AccessLevel as Read. This approach is highly flexible and ensures that as the quality controller changes, the sharing access is updated accordingly.
User-managed sharing (Option A), often referred to as manual sharing, requires manual intervention by the record owner and cannot be fully automatic in the context of complex business logic without Apex. Therefore, Apex-managed sharing provides the necessary automation and precision for record-level security based on dynamic lookup values.
Question 392:
An end user reports that a Lightning component is performing poorly. Which two steps should to taken in production to investigate? (Choose Two)
A. Enable Debug Mode for Lightning component B. Print consoIe.log{} statements to identify where actions are delayed. C. Use the salesforce Lightning inspector chrome extension. D. Add a trace flag to the user who reported the issue.
C. Use the salesforce Lightning inspector chrome extension. D. Add a trace flag to the user who reported the issue.
Question 393:
Which type of controller is best suited when you want all of the basic DML functions from an object's normal new/edit page?
A. Standard Controller B. Standard List/Set Controller C. Controller Extensions D. Custom Controller
A. Standard Controller
Question 394:
Which of the following variables are not transmitted in the view state? (Choose two.)
A. Private B. Transient C. Public D. Static
B. Transient D. Static
Question 395:
Which of the follow be used together in DML operations (transaction)? (Choose two.)
A. Account - AccountShare B. Case - CaseComment C. Opportunity - User D. Account - Order
A. Account - AccountShare B. Case - CaseComment
Question 396:
A developer needs to create a Lightning page for entering Order Information. An error message should be displayed if the zip code entered as part of the Order's shipping address is not numeric.
What is a recommended way for the error message be displayed to the end user?
A. Use the apex:message tag to display errors B. Use the aura:component tag to display errors C. Use the uhoutputText tag to display errors D. Use the uhinputDefaultError tag to display errors
D. Use the uhinputDefaultError tag to display errors
Question 397:
The Account edit button must be overridden in an org where a subset of users still use Salesforce Classic. The org already has a Lightning Component that will do the work necessary for the override, and the client wants to be able to reuse it.
How should a developer implement this?
A. Override the edit button for both Lightning and Classic with a Lightning Component B. Override the edit button for both Lightning and Classic with a new Visualforce page C. Override the edit button for Lightning with a Lightning Page, and Classic with a Visualforce page that contains the Lightning Component D. Override the edit button for Lightning with a Lightning Component, and Classic with a Visualforce page that contains the Lightning Component
C. Override the edit button for Lightning with a Lightning Page, and Classic with a Visualforce page that contains the Lightning Component
Question 398:
When an Account is initially created, the user specifies the Audit_Code__c. Each User in the org has a unique text field, Audit_Code_c, that is used to automatically assign the correct user to the Account's Auditor__c field.
What should be changed to most optimize the code's efficiency? (Choose two.)
A. Add an initial SOQL query to get all distinct audit codes. B. Add a WHERE clause to the SOQL query to filter on audit codes. C. Build a Map> of audit code to accounts. D. Build a Map> of Account Id to audit codes.
B. Add a WHERE clause to the SOQL query to filter on audit codes. C. Build a Map> of audit code to accounts.
Question 399:
A business currently has a process to manually upload orders from its external Order Management System (OMS) into Salesforce.
This is a labor intensive process since accounts must be exported out of Salesforce to get the IDs. The upload file must be updated with the correct account IDs to relate the orders to the corresponding accounts.
Which two recommendations should make this process more efficient? (Choose Two)
A. Ensure the data in the file is sorted by the order ID. B. Use the upsert wizard in the Data Loader to import the data. C. Identify unique fields on Order and Account and set them as External IDs. D. Use the Insert wizard In the Data Loader to Import the data.
B. Use the upsert wizard in the Data Loader to import the data. C. Identify unique fields on Order and Account and set them as External IDs.
Explanation
The current bottleneck is caused by the need to resolve Salesforce Internal IDs ($001...$) for the Account lookup before orders can be imported. This can be completely bypassed by using External IDs (Option C) and the Upsert operation (Option B) .
External IDs: By marking a unique field from the OMS (like OMS_Account_Number__c) as an External ID in Salesforce, the developer creates a "foreign key" that Salesforce understands. Upsert Wizard: When using the Data Loader's Upsert wizard, the user is asked which field should be used to match the parent Account. By selecting the OMS_Account_Number__c external ID, the Data Loader allows the user to map the orders directly to accounts using the OMS number found in the CSV file.
Salesforce will automatically find the correct Account ID in the background. This eliminates the "export-and- VLOOKUP" step entirely. Option D (Insert) would still require internal IDs. Option A (sorting) helps with performance in massive loads but doesn't solve the manual ID matching problem. Using Upsert with External IDs is the platform-recommended way to streamline recurring data integrations.
Question 400:
A developer created an Apex class that makes outbound RESTful callout. The following was created to send a fake response in Apex test methods.
@IsTest public class TestHttpCalloutMock implements HttpCalloutMock {
public HTTPResponse respond(HTTPRequest request) { HttpResponse response = new HttpResponse();
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.