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 181:
A developer wrote an Apex method that makes an HTTP callout to an external system to get specialized data when a button is clicked from a custom Lightning web component on the Account record page.
Recently, users have complained that it takes longer than desired for the data to appear on the page after clicking the button.
What should the developer use to troubleshoot this issue?
A. Lightning Inspector B. Devdoper Console C. Salesforce CU D. Event Logs
A. Lightning Inspector
Question 182:
The "action" attribute on <apex:page> is ONLY evaluated on which type of request?
A. Get request B. Postback request
A. Get request
Question 183:
A company has a web page that needs to get Account record information, given its Salesforce record ID, from JavaScript on the page and then display it. Which method of integration is optimal?
A. SOAP API B. Apex REST Web Service C. Apex SOAP Web Service D. REST API
B. Apex REST Web Service
Question 184:
Universal Containers has an existing automation where a custom record called Account Plan is created upon an Account being marked as a Customer. Recently, a Workflow Rule was added so that whenever an Account is marked as a Customer, a Customer Since date field is updated with today's date.
Now, since the addition of the Workflow Rule, two Account Plan records are created whenever the Account is marked as a Customer.
What might cause this to happen?
A. The Apex Trigger responsible for the record creation is not bulk safe and calls insert inside of a for loop. B. The Apex Trigger responsible for the record creation does not use a static variable to ensure it only fires once. C. The Workflow Rule responsible for the record creation fires twice because the Customer Since field update is marked as Re-evaluate Workflow Rules After Field Change. D. The Process Builder responsible for the record creation fires before and after the Workflow Rule.
C. The Workflow Rule responsible for the record creation fires twice because the Customer Since field update is marked as Re-evaluate Workflow Rules After Field Change.
Question 185:
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.
B. Implement pagination with a StandardSetController.
Question 186:
Given the following containment hierarchy:
What is the correct way to communicate the new value of a property named ''passthrough'' to my-parent component if the property is defined within my-child-component?
A. Option A B. Option B C. Option C D. Option D
B. Option B
Explanation
In Lightning Web Components (LWC), data flows "down" via properties and "up" via events. When a child component needs to communicate a change in a property or state to its parent, it must dispatch a CustomEvent. To pass specific data-- such as the new value of the passthrough property--along with the event, the developer must use the detail property within the event initialization object.
Option B is the correct syntax. It creates a new CustomEvent named 'passthrough' and assigns the current value of the component's property (this.passthrough) to the detail key. The parent component can then listen for this event (using onpassthrough={handleEvent}) and access the value via event.detail. Option A is incorrect because it wraps the variable in quotes, passing the literal string "this.passthrough" instead of the actual data. Option D creates an event but fails to include the data payload, meaning the parent would know an event occurred but wouldn't receive the new value. Option C uses incorrect syntax for event naming and variable referencing. Using the standard CustomEvent constructor with the detail property is the platform- standard way to ensure robust, typed data communication between component layers in the Shadow DOM.
Question 187:
Which three approaches should a developer implement to obtain the best performance for data retrieval when building a Lightning web component? (Choose three.)
A. Use (Cacheable=true) whenever possible. B. Use the Lightning Data Service. C. Use layoutTypes: [`Full'] to display a set of fields. D. Use lazy load for occasionally accessed data. E. Use getRecordUi to obtain metadata.
A. Use (Cacheable=true) whenever possible. B. Use the Lightning Data Service. E. Use getRecordUi to obtain metadata.
Question 188:
An Apex trigger creates a Contract record every time an Opportunity record is marked as Closed and Won. A developer is tasked with preventing Contract records from being created when mass loading historical Opportunities, but the daily users still need the logic to fire.
What is the most extendable way to update the Apex trigger to accomplish this?
A. Add the Profile ID of the user who loads the data to the trigger. B. Add a validation rule to the Contract to prevent creation by the data load user. C. Use a hierarchy custom setting to skip executing the logic inside the trigger for the user who loads the data. D. Use a list custom setting to disable the trigger for the user who loads the data.
C. Use a hierarchy custom setting to skip executing the logic inside the trigger for the user who loads the data.
Explanation
Managing "Trigger Kill Switches" is a critical requirement for data migration. The most "extendable" and platform-standard approach is using a Hierarchy Custom Setting (Option C) .
A hierarchy setting allows for different values at the Organization, Profile, and User levels. A developer can create a checkbox field called Disable_Opportunity_Trigger__c. In the trigger, the code would check: if (MySettings__c.getInstance ().Disable_Opportunity_Trigger__c) return;. During a mass data load, the administrator can enable this checkbox specifically for the integration user or the specific administrator performing the load. Because it is a hierarchy, it doesn't affect standard users.
This approach is superior to hard-coding Profile IDs (Option A) because IDs change between environments. It is also better than List Custom Settings (Option D) because it provides the automatic "fallback" logic (User > Profile > Org) that makes management much simpler. Validation rules (Option B) would cause the trigger to fail with an exception, which could stop the entire data load transaction, whereas the Custom Setting approach allows the trigger to "gracefully" skip its logic and allow the Opportunity to be saved without creating a Contract.
Question 189:
A developer writes the following Apex trigger so that when a Case is closed, a single Survey record is created for that Case. The issue is that multiple Survey_c records are being created per Case.
trigger CaseTrigger on Case (after insert, after update){ List<Survey_c> createSurveys = new List<Survey_c>(); for (Case c : trigger.new){ if (c.IsClosed && (trigger.isInsert II trigger.isUpdate && trigger.oldMap.get(c.Id).IsClosed == false)) { createSurveys.add(new Survey_c(Case_c = c.Id)); } } insert createSurveys; }
What could be the cause of this issue?
A. A user is creating the record as Closed B. A workflow rule is firing with a Create Task action C. A workflow rule is firing with a Field Update action D. A user is editing the record multiple times
D. A user is editing the record multiple times
Question 190:
The test method above tests in Apex trigger that the developer knows will make a lot of queries when a lot of Accounts are simultaneously updated to be customers.
The test method fails at the Line 20 because of too many SOQL queries.
What is the correct way to fix this?
A. Change the DataFactory class to create fewer Accounts so that the number of queries in the trigger is reduced B. Add Test.startTest() before and Test.stopTest() after both Line 7 of the code and Line 20 of the code C. Add Test.startTest() before Line 18 of the code and add Test.stopTest() after line 18 of the code D. Replace most of the Apex Trigger with Process Builder processes to reduce the number of queries in the trigger
B. Add Test.startTest() before and Test.stopTest() after both Line 7 of the code and Line 20 of the code
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.