Last Updated On : 18-Nov-2026
Salesforce Platform Developer - Plat-Dev-201 Practice Test
Prepare with our free Salesforce Platform Developer - Plat-Dev-201 sample questions and pass with confidence. Our Salesforce-Platform-Developer practice test is designed to help you succeed on exam day.
Salesforce 2026
A developer creates a batch Apex job to update a large number of records, and receives reports of the job timing out and not completing. What is the first step towards troubleshooting the issue?
A. Check the asynchronous job monitoring page to view the job status and logs.
B. Check the debug logs for the batch job.
C. Decrease the batch size to reduce the load on the system.
D. Disable the batch job and recreate it with a smaller number of records.
Explanation:
When a batch Apex job is timing out or not completing, the first step in troubleshooting is to check the Asynchronous Jobs monitoring page in Salesforce Setup. This will show:
The status of the job (e.g., Completed, Failed, Aborted)
Error messages, if any
Start/end times
Number of records processed
This helps you understand where and why the failure is occurring before taking further action.
Universal Containers recently transitioned from Classic to Lighting Experience. One of its business processes requires certain value from the opportunity object to be sent via HTTP REST callout to its external order management system based on a user-initiated action on the opportunity page. Example values are as follow
Name
Amount
Account
Which two methods should the developer implement to fulfill the business requirement? (Choose 2 answers)
A. Create a Lightning component that performs the HTTP REST callout, and use a Lightning Action to expose the component on the Opportunity detail page.
B. Create a Process Builder on the Opportunity object that executes an Apex immediate action to perform the HTTP REST callout whenever the Opportunity is updated.
C. Create an after update trigger on the Opportunity object that calls a helper method using @Future(Callout=true) to perform the HTTP REST callout.
D. Create a Visualforce page that performs the HTTP REST callout, and use a Visualforce quick action to expose the component on the Opportunity detail page.
D. Create a Visualforce page that performs the HTTP REST callout, and use a Visualforce quick action to expose the component on the Opportunity detail page.
Explanation:
Since Universal Containers transitioned to Lightning Experience, the best approach is to use user-initiated actions that allow direct execution of the HTTP REST callout when the user interacts with the Opportunity record.
Why are A and D correct?
A. Lightning Component + Lightning Action:
Lightning Actions can be used to trigger custom logic via a Lightning Component, allowing users to initiate the REST callout directly from the Opportunity detail page.
This provides a modern, flexible solution that fits well with Lightning Experience.
D. Visualforce Page + Quick Action:
Visualforce pages can execute HTTP REST callouts and can be exposed as Quick Actions, allowing the user to trigger the request manually.
This solution is useful for organizations transitioning from Classic to Lightning while still leveraging existing Visualforce-based logic.
A developer is tasked to perform a security review of the ContactSearch Apex class that exists in the system. Whithin the class, the developer identifies the following method as a security threat: List
A. Use variable binding and replace the dynamic query with a static SOQL.
B. Use the escapeSingleQuote method to sanitize the parameter before its use.
C. Use a regular expression on the parameter to remove special characters.
D. Use the @Readonly annotation and the with sharing keyword on the class.
D. Use the @Readonly annotation and the with sharing keyword on the class.
Explanation:
The provided method is vulnerable to SOQL injection because it directly includes untrusted user input (lastName) in a dynamic SOQL query. To fix this, the developer should sanitize the input and/or avoid dynamic queries when possible.
A. Use variable binding and replace the dynamic query with a static SOQL.
This is the best and most secure approach. Using variable binding (bind variables) ensures that input is treated as data, not executable code:
List
B. Use the escapeSingleQuote method to sanitize the parameter before its use.
If dynamic SOQL must be used, sanitizing input with String.escapeSingleQuotes(lastName) helps prevent injection by escaping special characters:
String safeInput = String.escapeSingleQuotes(lastName);
List
In the following example, which sharing context will myMethod execute when it is invoked?
A. Sharing rules will not be enforced for the running user.
B. Sharing rules will be Inherited from the calling context.
C. Sharing rules will be enforced by the instantiating class.
D. Sharing rules will be enforced for the running user.
Explanation:
In Apex, if a class is defined without the with sharing or without sharing keyword (as in your example), then it runs in the sharing context of the caller. This is known as inherited sharing behavior.
Example Analysis:
public class myClass {
public void myMethod() {
// implementation
}
}
The class doesn't explicitly specify a sharing context.
Therefore, myMethod will execute in the sharing context of the class or code that called it.
Since Aura application events follow the traditional publish-subscribe model, which method is used to fire an event?
A. ernit()
B. fireEvent()
C. fire()
D. registerEvent()
Explanation:
In Aura components, application events follow the publish-subscribe model, meaning any component that registers for the event can handle it when it's fired. To trigger an Aura application event, developers use the fire() method.
How it works:
Define the event using the
Register the event in the component that will handle it.
Fire the event using event.fire() in the component that triggers the event.
Analyzing the incorrect options:
A. ernit() – This method doesn't exist in Aura event handling.
B. fireEvent() – This is an incorrect method; fire() is the correct one.
D. registerEvent() – This method is used to register an event in the component, not to fire it.
| Salesforce-Platform-Developer Exam Questions - Home | Previous |
| Page 5 out of 37 Pages |