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 221:
What is the transaction limit for the number of records using QueryLocator?
A. 50,000 B. 50,000,000 C. 100,000 D. 5,000,000 E. There is no limit
B. 50,000,000
Explanation
"Scope" parameter in "executeBatch" can be set up to 2,000 records
Question 222:
Which two objects can be inserted in the same transaction? (Choose two.)
A. Opportunity and User B. Account and AccountShare C. Case and CaseComment D. Account and Group
B. Account and AccountShare C. Case and CaseComment
Question 223:
A developer wants to integrate invoice and invoice line data into Salesforce from a custom billing system. The developer decides to make real-time callouts from the billing system using the SOAP API. Unfortunately, the developer is getting a lot of errors when inserting the invoice line data because the invoice header record doesn't exist yet.
What will help ensure the transactional integrity of the integration?
A. Create the invoice header and the related invoice lines in the same create() call leveraging External Ids. B. Develop a custom Apex web service to handle a custom JSON data structure with both invoice header and related invoice lines. C. Use an ETL tool and the Bulk API running nightly, thus ensuring all of the data is handled at the same time. D. Set the AIIOrNoneHeader to true when calling each of create() for invoice headers and create() for invoice lines.
A. Create the invoice header and the related invoice lines in the same create() call leveraging External Ids.
Question 224:
Choose the correct definition for <apex:pageMessage>.
A. Standard Salesforce formatting, throws a specific message on a page B. Standard Salesforce formatting, shows all errors that occur on page. Can add more messages through the "ApexPages.addMessage" function C. A single message, without formatting, that can be associated with a specific component on the page D. No formatting; displays all errors on a page
D. No formatting; displays all errors on a page
Question 225:
After a Platform Event is defined in a Salesforce org, events can be published via which two mechanisms? (Choose Two)
A. internal Apps can use Outbound Messages B. Internal Apps can use Process Builder. C. External Apps require a custom Apex web service. D. External Apps can use the standard Streaming API.
B. Internal Apps can use Process Builder. D. External Apps can use the standard Streaming API.
Explanation
Internal apps can use processes, flows, or Apex to publish platform event messages from a Salesforce app. Process Builder is a tool that lets you automate business processes by creating processes. You can use Process Builder to publish platform event messages when a record changes or when a platform event occurs.
external apps can use Salesforce APIs to publish platform event messages. You can use any Salesforce API to create platform events, such as SOAP API, REST API, or Bulk API. The Streaming API is a Salesforce API that lets you push a stream of notifications from Salesforce to external apps. You can use the Streaming API to publish platform event messages by creating records of your event type. Therefore, using Process Builder and Streaming API are two mechanisms to publish platform event messages after a platform event is defined in a Salesforce org.
The head of recruiting at Universal Containers wants to provide all internal users the ability to search for open positions by role, department, and location via a new recruiting app. In addition to search, users of the app should be able to refer a friend, apply for a position, and review the status of their current submissions. The app should be made available in Salesforce Mobile, but offline access is not required.
Given these requirement, what is the recommended approach to develop the app?
A. Lightning Experience Builder B. Salesforce SDK C. Visualforce D. Lightning Web Components
D. Lightning Web Components
Explanation
When developing custom functionality to be surfaced within the standard Salesforce Mobile App, Lightning Web Components (LWC) (Option D) is the recommended approach. LWCs are the modern, high- performance standard for Salesforce development, utilizing modern web standards (ES6+, Web Components) that run natively in the browser.
LWC is preferred over the other options for several reasons:
Performance: LWCs are lightweight and provide a much faster, more responsive user interface than Visualforce (Option C), which is critical for mobile user experience.
Standardization: Since the app will be accessed via the standard Salesforce mobile app , LWCs integrate seamlessly into the mobile navigation, tabs, and action menus.
Customization: LWCs provide full control over the CSS and HTML, allowing the developer to meet the "custom user interface design" requirement while still leveraging the Lightning Data Service for efficient data handling.
Option B (Salesforce SDK) is for building "Custom/Native" standalone apps, not for extending the standard Salesforce app. Option A (Experience Builder) is primarily for external sites (Communities). LWC provides the perfect balance of "custom design" and "native integration" for internal mobile users.
Question 227:
A company accepts orders for customers in their enterprise resource planning (ERP) system that must be integrated into Salesforce as Order__c records with a lookup field to Account. The Account object has an external ID field, ERP_Customer_ID__c.
What should the integration use to create new Order__c records that will automatically be related to the correct Account?
A. Upsert on the Order__c object and specify the ERP_Customer_ID__c for the Account relationship. B. Merge on the Order__c object and specify the ERP_Customer_ID__c for the Account relationship. C. Insert on the Order__c object followed by an update on the Order__c object. D. Upsert on the Account and specify the ERP_Customer_ID__c for the relationship.
A. Upsert on the Order__c object and specify the ERP_Customer_ID__c for the Account relationship.
Explanation
In Salesforce integration, the Upsert operation is highly powerful because it allows you to create or update records and relate them to other records using External IDs instead of Salesforce record IDs (001...).
When the ERP system sends an order, it may not know the 18-character Salesforce ID for the Account, but it does know the ERP_Customer_ID__c. By performing an Upsert on the Order__c object (Option A), the integration can leverage "foreign key" syntax in the API payload. This essentially tells Salesforce: "Create this Order and link its Account__c lookup field to the Account that has this specific ERP_Customer_ID__c."
This approach is the "gold standard" for integrations because:
It eliminates the need for the external system to perform a lookup query in Salesforce to find an ID before creating a record.
It reduces the total number of API calls, saving on governor limits.
It handles idempotency, ensuring that if the same order is sent twice, it is updated rather than duplicated.
Options B, C, and D are less efficient. Merging (Option B) is used for deduplication. The insert-then-update approach (Option C) is an anti-pattern that doubles the required API calls and transaction overhead. Upserting the Account (Option D) does not create the Order.
Question 228:
What is a potential design issue with the following code?
List<Opportunity> opptysClosedLost = new List<Opportunity>();
List<Opportunity> lstAllOpp = [ SELECT StageName FROM Opportunity WHERE AccountId IN :Trigger.newMap.keySet() ];
if (!lstAllOpp.isEmpty()) { processOpportunity = true;
}
while (processOpportunity) {
for (Opportunity o : lstAllOpp) {
if (o.StageName == 'Closed - Lost') { opptysClosedLost.add(o);
}
} processOpportunity = false;
if (!opptysClosedLost.isEmpty()) { delete opptysClosedLost;
}
}
}
A. SOQL could be avoided by creating a formula field for StageName in Account from the related Opportunity B. The code will result in a System.LimitException: Too many script statements error C. The code will result in a System.DmlException: Entity is deleted error D. The code will result in a System.LimitException: Apex CPU time limit exceeded error
D. The code will result in a System.LimitException: Apex CPU time limit exceeded error
Question 229:
A lead developer for a Salesforce organization needs to develop a page-centric application that allows the user to interact with multiple objects related to a Contact.
The application needs to implement a third-party JavaScript framework such as Angular, and must be made available in both Classic and Lightning Experience.
Given these requirements, what is the recommended solution to develop the application?
A. Aura Components B. Lightning Web Components C. Visualforce D. Lightning Experience Builder
C. Visualforce
Question 230:
Consider the code above.
When a user clicks on the Link of a Contact's name, what happens?
A. The outputPanel refreshes, showing the Contacts details. B. A new page opens, showing the Contact's details. C. The page refreshes, showing the Contact's details. D. Nothing happens: the commandLink is missing an action attribute.
A. The outputPanel refreshes, showing the Contacts details.
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.