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 71:
The SOAP API_________.
A. Is based on REST principles and is optimized for loading or deleting large sets of data. You can use it to query, queryAII, insert, update, upsert, or delete many records asynchronously by submitting batches B. Provides a powerful, convenient, and simple REST-based web services interface for interacting with Salesforce. Its advantages include ease of integration and development, and it's an excellent choice of technology for use with mobile applications and web projects C. Is used to create, retrieve, update or delete records, such as accounts, leads, and custom objects, and allows you to allows you to maintain passwords, perform searches, and much more D. Is used to retrieve, deploy, create, update, or delete customizations for your org. The most common use is to migrate changes from a sandbox or testing org to your production environment
C. Is used to create, retrieve, update or delete records, such as accounts, leads, and custom objects, and allows you to allows you to maintain passwords, perform searches, and much more
Question 72:
What is a valid request for the following REST method? (Choose two.)
A. <request><s1>my first string</s1><i1>123</i1><s2>my second string</s2><b1>false</b1></request> B. <request><s1>"my first string"</s1><i1>123</i1><s2>"my second string"</s2><b1>false</b1></request> C. {"s1": "my first string","i1": "123","b1": "false","s2": "my second string"} D. {"i1": 123,"s1": "my first string","s2": "my second string","b1": false}
A. <request><s1>my first string</s1><i1>123</i1><s2>my second string</s2><b1>false</b1></request> D. {"i1": 123,"s1": "my first string","s2": "my second string","b1": false}
Question 73:
What Visualforce tag can be used to display custom messages in pages using the Salesforce Ul styling for errors, warnings, and other types of messages?
A. <apex:customMessage> B. <apex:error> C. <apex:message> D. <apex:pageMessage>
D. <apex:pageMessage>
Question 74:
A company represents their customers as Accounts that have an External ID field called Customer_Number__c. They have a custom Order (Order__c) object, with a Lookup to Account, to represent Orders that are placed in their external order management system (OMS). When an order is fulfilled in the OMS, a REST call to Salesforce should be made that creates an Order record in Salesforce and relates it to the proper Account.
What is the optimal way to implement this?
A. Perform a REST GET on the Account and a REST POST to update the Order__c with the Account's record ID. B. Perform a REST PATCH to upsert the Order__c and specify the Account's Customer_Number__c in it. C. Perform a REST GET on the Account and a REST PATCH to upsert the Order__c with the Accounts record ID. D. Perform a REST POST to update the Order__c and specify the Account's Customer_Number__c in it.
B. Perform a REST PATCH to upsert the Order__c and specify the Account's Customer_Number__c in it.
Question 75:
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 afterEach() 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 j.sdom instance for each test.
A. Reset the DOM after each test with the afterEach() method.
Explanation
Jest tests for Lightning Web Components (LWC) run in a virtual browser environment called JSDOM. In this environment, the document.body persists across individual test cases (it or test blocks) within a single test file. If a developer mounts a component to the DOM in the first test and doesn't remove it, the component's state and DOM elements will still be present when the second test starts, leading to "leaked" data and unreliable test results.
To ensure test isolation--which is critical for testing conditional rendering--the developer must clean up the DOM after every test. The standard best practice is to use the afterEach() hook ( Option A ). Within this hook, the developer should execute a loop that removes all child elements from document.body. This ensures that each test begins with a completely "clean slate."
Option B is too vague; "teardown block" is a general term, but afterEach() is the specific Jest implementation. Option C is for organizing tests but doesn't handle DOM cleanup. Option D is unnecessary as the LWC testing utility manages the JSDOM instance. By using afterEach() to reset the DOM, the developer can accurately verify that the component correctly shows or hides child components based on the specific inputs provided in each individual test case.
Question 76:
Which three Visualforce components can be used to initiate Ajax behavior to perform partial page updates? (Choose Three)
A. <apex:actionSupport> B. <apex:commandLink> C. <apex:actionStatus> D. <apex:commandButton> E. <apex:form>
A. <apex:actionSupport> B. <apex:commandLink> D. <apex:commandButton>
Explanation
In Visualforce, partial page updates (AJAX) are achieved using the reRender attribute. This attribute allows a component to refresh only a specific part of the page identified by an ID, rather than performing a full browser reload.
<apex:commandButton> (Option D) and <apex:commandLink> (Option B) are standard action components. When their reRender attribute is populated, they perform an asynchronous postback.
<apex:actionSupport> (Option A) is an auxiliary component that adds AJAX functionality to other components that do not natively support it. For example, you can place an actionSupport inside an inputText to trigger a partial refresh on the onchange event. Option E (<apex:form>) is a container and does not initiate AJAX behavior itself. Option C (<apex:actionStatus>) is used to display the status of an AJAX request (e.g., a loading spinner) but does not initiate the request.
Question 77:
A company has the Lightning Component above that allows users to click a button to save their changes and redirects them to a different page. Currently, when the user hits the Save button the records are getting saved, but they are not redirected.
Which three techniques can a developer use to debug the JavaScript? (Choose three.)
A. Use Developer Console to view checkpoints. B. Use Developer Console to view the debug log. C. Use consde.log() messages in the JavaScript. D. Enable Debug Mode for Lightning components for the user. E. Use the browser's dev tools to debug the JavaScript.
C. Use consde.log() messages in the JavaScript. D. Enable Debug Mode for Lightning components for the user. E. Use the browser's dev tools to debug the JavaScript.
Explanation
Debugging client-side JavaScript in Lightning components requires different tools than debugging server-side Apex.
First, using the browser's developer tools (Option E) is the most powerful method. It allows developers to set breakpoints in the controller or helper files, inspect the values of component attributes in real-time, and step through the redirection logic line-by-line. To make this process easier, the developer should Enable Debug Mode (Option D) in Salesforce Setup. By default, Lightning code is "minified" (compressed) to improve performance, making it nearly impossible to read in dev tools. Enabling Debug Mode serves the uncompressed source code to the browser, making the scripts human-readable.
Additionally, inserting console.log() messages (Option C) is a standard technique to output variable states or execution markers to the browser's console. This helps verify if the helper.saveAndRedirect function is being reached and if the redirection parameters are correct.
Options A and B are incorrect because the Developer Console's debug logs and checkpoints are strictly for server-side Apex execution . They do not capture JavaScript errors or the execution flow of the Lightning framework in the browser.
Question 78:
Universal Containers develops a Visualforce page that requires the inclusion of external JavaScript and CSS files. They want to ensure efficient loading and caching of the page.
Which feature should be utilized to achieve this goal?
A. Static resources B. RemoteAction C. PageBlockTable D. ActionFunction
A. Static resources
Explanation
To optimize the performance of a Visualforce page that uses external assets, Static Resources (Option A) is the platform-native best practice. Static resources allow you to upload content such as archives (.zip or .jar files), images, stylesheets, and JavaScript files that you can reference in a Visualforce page.
The primary benefits of using Static Resources over other methods (like hosting files externally or hardcoding styles) include:
Caching: Salesforce serves static resources from a Content Delivery Network (CDN). This means once a user's browser loads the JavaScript or CSS file, it is cached locally, significantly reducing page load times for subsequent requests.
Relative Referencing: Using the $Resource global variable (e.g., {!URLFOR($Resource.MyZipFile, 'styles/main.css')}) ensures that your page references the correct version of the file across different environments (Sandbox, Production) without changing hardcoded URLs.
Efficiency: By bundling related files into a single ZIP archive as a static resource, you reduce the number of HTTP requests the browser must make to render the page.
Options B and D are related to AJAX and JavaScript-to-Apex communication, and Option C is a component used for rendering data tables; none of these address the storage or caching of external front-end assets.
Question 79:
In a previous data audit, It was determined that close to 5 million Opportunity records are stored within the Salesforce environment. The organization-wide default for the object are set to Public Read-Only and most opportunities are related to an external case.
The method is called from a Lightning web component. Some end users do not provide a cased value and experience low performance while running the query.
Which two techniques should the developer implement to avoid low performance queries from executing? (Choose Two)
A. Implement a LIMIT clause within the SOQL query to restrict the result set. B. Ensure the user-provided input is not null before executing the SOQL query. C. Implement the with sharing keyword on the Apex class. D. Use SOSL instead of SOQL queries to perform text-based searches.
A. Implement a LIMIT clause within the SOQL query to restrict the result set. D. Use SOSL instead of SOQL queries to perform text-based searches.
Question 80:
A developer is building a Visualforce page that interacts with external services. Which interface should the developer implement to test this functionality? (Choose two.)
A. HTTPCalloutMock B. HTTPRequestMock C. HTTPResponseMock D. StaticResourceCalloutMock
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.