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 421:
Universal Containers (UC) currently does not development in its full copy sandbox.
Recently, UC has projects that require multiple developers to develop concurrently. UC is running into issues with developers making changes that cause errors In work done by other developers.
Additionally, when they are ready to deploy, many unit tests fail which prevents the deployment.
Which three types of orgs should be recommended to UC to eliminate these problems? (Choose Three)
A. Data Migration org B. Development org C. Staging org D. Systems Integration org E. Continuous Integration (CI) Org
A. Data Migration org C. Staging org E. Continuous Integration (CI) Org
Question 422:
A developer receives an error when trying to call a global server-side method using the @remoteAction decorator.
How can the developer resolve the error?
A. Add static to the server-side method signature. B. Decorate the server-side method with (static=true). C. Change the function signature to be private static. D. Decorate the server-side method with (static=false)
A. Add static to the server-side method signature.
Question 423:
Which SELECT statement should be used to retrieve Task records that are between 12 and 24 months old, including archived tasks, and excluding deleted tasks?
This query requires a specific understanding of how Salesforce handles old records. Salesforce "archives" Tasks that are older than 365 days to maintain performance. These archived records are not returned by standard SOQL queries. To include archived records in a query, the developer must use the ALL ROWS keywords at the end of the query. However, ALL ROWS also returns records that are in the Recycle Bin (deleted records). To satisfy the requirement of "including archived" but "excluding deleted," the developer simply needs to rely on the fact that standard WHERE clause filters apply to the results of ALL ROWS.
Option B is the most accurate. In SOQL, isDeleted=false is implicit unless you are specifically looking for deleted records. The crucial part is the ALL ROWS keyword which brings the archived tasks into scope.
Options A and D are incorrect because isArchived=true would only return the archived tasks and exclude those that are not yet archived. Option C is redundant because isDeleted=false is the default behavior. The syntax => in the prompt options is also technically a typo for >=. Option B represents the standard way to query across the "active" and "archived" boundary while ignoring the Recycle Bin.
Question 424:
When calling a RESTful web service, a developer receives a JSON payload that has a data hierarchy that is nested three levels deep. How can the developer describe the external data?
A. Deserialize the data untyped and then process it. B. Declare a class with three levels and deserialize the JSON typed with this class. C. Use the ANT migration tool, the custom metadata API, or the Dataloader. D. Use middleware to flatten the JSON and consume it as a new custom object.
A. Deserialize the data untyped and then process it.
Question 425:
Which code snippet processes records in the most memory-efficient manner, avoiding governor limits such as "Apex heap size too large"?
A. JavaMap<Id, Opportunity> opportunities = new Map<Id, Opportunity>([SELECT Id, Amount FROM Opportunity]);for (Id oppId : opportunities.keySet()) {// perform operation here} B. Javafor (Opportunity opp : [SELECT Id, Amount FROM Opportunity]) {// perform operation here} C. JavaList<Opportunity> opportunities = Database.query('SELECT Id, Amount FROM Opportunity');for (Opportunity opp : opportunities) {// perform operation here} D. JavaList<Opportunity> opportunities = [SELECT Id, Amount FROM Opportunity];for (Opportunity opp : opportunities) {// perform operation here}
B. Javafor (Opportunity opp : [SELECT Id, Amount FROM Opportunity]) {// perform operation here}
Explanation
When processing large data volumes in Apex, the heap size limit (6 MB for synchronous transactions and 12 MB for asynchronous transactions) is a common bottleneck. This limit tracks the amount of memory consumed by objects and variables currently in scope.
Option B uses the SOQL for loop pattern. This is the most memory-efficient approach because it processes records in chunks of 200 at a time using internal query locators. Instead of loading the entire result set, which could contain thousands of records, into a single collection in memory, the SOQL for loop iterates over the records without ever holding the full set in the heap. This prevents the "Apex heap size too large" error when working with high-volume queries.
In contrast, options A, C, and D all assign the full query result to a collection, either a Map or a List, before the loop begins. This immediately consumes heap space proportional to the number of records and fields retrieved. If the query returns a large number of records, these collections can exceed the heap limit before the loop executes. Therefore, when memory efficiency is the priority in bulk data processing, the inline SOQL for loop shown in option B is the recommended best practice.
Question 426:
A developer needs to add code to a Lightning web component's configuration file so the component only renders for a desktop size form factor when on a record page.
What should the developer add to the component's record page target configuration to meet this requirement?
A. <supportedFormFactors> <supportedFormFactor type="Large"/> </supportedFormFactors> B. <lightningLayout> </lightningLayout> C. <design> ... D. <property name="formFactor" value="Large"> ...
A. <supportedFormFactors> <supportedFormFactor type="Large"/> </supportedFormFactors>
Explanation
In a Lightning Web Component's configuration file (.js-meta.xml), the <supportedFormFactors> tag allows the developer to specify which device form factors the component supports. To restrict the component to only render on desktop devices, the developer must specify the type="Large".
If supportedFormFactors is not specified, the component defaults to supporting both Small (phone) and Large (desktop) form factors. Options B, C, and D are incorrect syntax for defining form factor support in LWC metadata.
Question 427:
A developer must create a custom pagination solution for accessing approximately 2000 records and displaying 50 records on each page. Data from Salesforce will be accessed via an API and not via Apex.
How can the developer meet these requirements? (Choose two.)
A. Use a StandardSetController B. Use CURSOR 50 in SOQL queries C. Use OFFSET in SOQL queries D. Use LIMIT 50 in SOQL queries
C. Use OFFSET in SOQL queries D. Use LIMIT 50 in SOQL queries
Question 428:
Consider the following code snippet:
A developer needs to built an interactive Aura component that responds to the user's input by hiding or showing sections according the user preferences.
What are two best practices the developer can implement to hide or show the powerVserView and s-rar.daraVserView inner components, based on the value of the attribute isPowexUser? (Choose Two)
A. Option A B. Option B C. Option C D. Option D
B. Option B
Question 429:
A developer receives complaints that the component loads slowly.
Which change can the developer implement to make the component perform faster?
A. Change the default for showContacrlnfo to "false". B. Move the contents of <c: concacclnfo into the component. C. Change the type of contactlnfo to "Map". D. Add a change event handler for showContactinfo
A. Change the default for showContacrlnfo to "false".
Question 430:
A customer requires that when the billing address field on an Account gets updated, the address field on all its related contact records should reflect the same update.
How can this requirement be met with minimal customizations?
A. Create an After Trigger on Account to upd|ate its related contact records on update B. Create a Workflow Rule on Account to update related child Contact records C. Create a Lightning Process on Account to update related child Contact records D. Create a scheduled batch job that updates all contact address fields based on the related account record.
C. Create a Lightning Process on Account to update related child Contact records
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.