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 241:
A developer needs to create a service that will process an email sent to it and create an account and contact using the contents of the email as data for the records.
How might a developer accomplish this requirement?
A. Use the Apex Inbound Email Handler B. Use the Fuel API with Email Data Extensions C. Use Heroku Data Clips to Process Email D. Use Auto-launched Flow and Process Builder
A. Use the Apex Inbound Email Handler
Question 242:
Which Salesforce feature allows a developer to see when a user last logged in to Salesforce if real-time notification is not required?
A. Asynchronous Data Capture Events B. Calendar Events C. Event Monitoring Log D. Developer Log
C. Event Monitoring Log
Explanation
To perform historical auditing and analysis of user behavior--such as tracking the last login time--Salesforce provides Event Monitoring (Option C) . This feature captures a wide range of "Event Types," including logins, logouts, URI (page) clicks, and API calls.
These events are stored in EventLogFile objects. Each day, Salesforce generates log files for the previous day's activity. A developer can query these files or use tools like the Salesforce Event Log File Browser to see a comprehensive history of user logins. This is the correct choice when real-time alerts are not necessary and the goal is to analyze patterns over time.
Option A refers to Change Data Capture, which is for tracking record changes, not user sessions. Option B is for the standard Salesforce Calendar. Option D (Developer Log) is used for debugging Apex and system execution in the short term and does not provide a reliable or long-term history of user login events. Event Monitoring provides the high-fidelity audit trail required for compliance and security analysis.
Question 243:
A Salesforce org has more than 50,000 contacts. A new business process requires a calculation that aggregates data from all of these contact records. This calculation needs to run once a day after business hours.
Which two steps should a developer take to accomplish this? (Choose Two)
A. Use the @future annotation. B. Implement the Database.Batchable interface. C. Implement the Schedulable interface. D. Implement the Queueable interface.
B. Implement the Database.Batchable interface. C. Implement the Schedulable interface. D. Implement the Queueable interface.
Explanation
This scenario presents two distinct requirements: processing a large volume of data (50,000 records) and running the process at a specific time (once a day after business hours).
Database.Batchable (Option B): Processing 50,000 records in a single synchronous transaction will exceed Apex Governor Limits (specifically the CPU time limit or the heap size limit). Batch Apex allows the system to process these records in smaller chunks (batches), ensuring that the calculation completes without hitting limits.
Schedulable (Option C): To ensure the job runs "once a day after business hours," the Schedulable interface is required. The developer allows the class to be scheduled via the Apex Scheduler or the UI.
The standard pattern for this use case is to create a class that implements Schedulable, and inside its execute method, instantiate and execute the Batch class (Database.executeBatch). This combines precise timing with bulk processing capabilities.
Question 244:
A developer is debugging an Apex-based order creation process that has a requirement to have three savepoints,
SP1, SP2, and SP3 (created in order), before the final execution of the process.
During the final execution process, the developer has a routine to roll back to SP1 for a given condition. Once the condition is fixed, the code then calls a roll back to SP3 to continue with final execution. However, when the roll, back to SP3 is called, a runtime error occurs.
Why does the developer receive a runtime error?
A. The developer should have called SP2 before calling SP3. B. SP3 became invalid when SP1 was rolled back. C. The developer has too many DML statements between the savepoints. D. The developer used too many savepoints in one trigger session.
B. SP3 became invalid when SP1 was rolled back.
Explanation
Salesforce uses Database.Savepoint objects to manage transaction integrity, allowing developers to roll back the database state to a specific point in time without aborting the entire transaction. However, savepoints follow a strict "stack" logic.
When you create savepoints in sequence (SP1, then SP2, then SP3), they exist in a linear timeline.
When a developer executes a Database.rollback(SP1), the system reverts the database state to exactly how it was when SP1 was created. A critical side effect of this operation is that any savepoints created after the target savepoint are immediately destroyed and invalidated. Because SP3 was created after SP1, rolling back to SP1 clears SP3 from the transaction's memory. Therefore, any subsequent attempt to call Database. rollback(SP3) will result in a runtime error because SP3 no longer exists.
To fix this logic, once the code rolls back to SP1 and addresses the condition, it would need to proceed forward through the logic again and potentially set new savepoints if needed. You cannot "jump back forward" to a later savepoint once an earlier one has been invoked, as the rollback has effectively erased the timeline that led to the later savepoints. Understanding this linear invalidation is essential for managing complex nested transactions in Apex.
Question 245:
Just prior to a new deployment, the Salesforce Administrator, who configured a new order fulfillment process feature in a developer sandbox, suddenly left the company.
As a part of the UAT cycle, the users had fully tested all of the changes in the sandbox and signed off on them; making the Order fulfillment feature ready for its go-live in the production environment.
Unfortunately, although a Change Set was started, it was not completed by the former administrator. A developer is brought in to help finish the deployment.
What should the developer do to identify the configuration changes that need to be moved into production?
A. Leverage the Setup Audit Trail to review the changes made by the departed Administrator and identify which changes should be added to the Change Set. B. Use the Metadata API and a supported development IDE to push all of the configuration from the sandbox into production to ensure no changes are lost. C. Set up Continuous Integration and a Git repository to automatically merge all changes from the sandbox metadata with the production metadata. D. In Salesforce setup, look at the last modified date for every object to determine which should be added to the Change Set.
A. Leverage the Setup Audit Trail to review the changes made by the departed Administrator and identify which changes should be added to the Change Set.
Question 246:
Which of the following elements can be members of a public group? (Choose three.)
A. Territories B. Case Teams C. Users D. Roles E. Profiles
A. Territories C. Users D. Roles
Question 247:
Choose the correct definition for <apex:actionFunction>.
A. Allows for controller methods to be called directly from Javascript. Must be encapsulated in <apex:form> tags. Unlike actionSupport, these function<apex:actionPoller>s can be called directly from Javascript code B. Sends an AJAX request according to the time interval you specify. If this ever gets re-rendered, it resets C. Adds AJAX support to another component (e.g. onClick, onMouseUp, onFocus, etc.) D. Can be associated with an AJAX request (actionFunction/actionSupport/actionPoller) and shows content conditionally depending on the status of the request (in progress/complete). Use the "id" field to specify name; use "status" field on related components to connect them E. Signifies which components should be processed by the server when an AJAX request is generated
A. Allows for controller methods to be called directly from Javascript. Must be encapsulated in <apex:form> tags. Unlike actionSupport, these function<apex:actionPoller>s can be called directly from Javascript code
Question 248:
A developer is trying to access org data from within a test class. Which sObject type requires the test class to have the (seeAllData=true) annotation?
A. RecordType B. Profile C. User D. Report
D. Report
Explanation
Salesforce enforces test isolation , meaning unit tests do not have access to the data in the organization by default. However, some objects are considered "metadata-like" or "setup objects" and are always visible to tests without special annotations. These include Users (Option C) Profiles (Option B) , and RecordTypes (Option A) .
Conversely, some objects are considered "data" but cannot be easily created within a test method due to their complexity or nature. Reports (Option D) , along with Pricebooks and Folders, fall into a category where access to existing org data is often required because the platform does not support DML operations to create them in a test context. To query for an existing Report record in a unit test, the test class or method must be annotated with @isTest(seeAllData=true).
Note: It is a best practice to avoid seeAllData=true whenever possible to ensure tests are deterministic and independent of the environment, but it remains a requirement for Report-related logic.
Question 249:
A developer needs test data for Apex test classes. What can the developer use to provide test data to the test methods? (Choose two.)
A. List<sObject> Is = Test.loadData (Lead.sObjectType, fmyTestLeads f); B. myDataFactory.createTestRecords (10) C. Database.createTestRecords (10) D. List<sObject> Is = Test.loadDat (Lead.sObjectType, $Resource + 'myTestLeads f);
A. List<sObject> Is = Test.loadData (Lead.sObjectType, fmyTestLeads f); B. myDataFactory.createTestRecords (10)
Question 250:
Within the System.Limit class, what would you call to get the number of calls made in your transaction?
A. get [typeOfLimit] --> (Ex. getDXLStaterr.ents ()) B. getLimit [typeOf Limit] --> (Ex. getLirr.it DXLSt at err.ents ())
A. get [typeOfLimit] --> (Ex. getDXLStaterr.ents ())
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.