About this exam
An advanced certification for developers building sophisticated programmatic solutions on the Salesforce Platform, with Salesforce Certified Platform Developer (formerly Platform Developer I) as a prerequisite. It covers Apex design patterns and asynchronous processing, integration with external systems, user interfaces with LWC, Aura and Visualforce, performance, and testing and debugging.
Try a sample question
This is an original sample question written by itmoshi based on the exam objectives.
An after insert trigger on Order must send new orders to an external ERP over REST. Requirements: (1) the send must happen in a separate transaction from the record save; (2) the processing logic should receive the list of Order sObjects directly; (3) you need the ID of the async job so you can track its status in AsyncApexJob. Which implementation is most appropriate?
- ABuild an HttpRequest in the trigger handler class and call Http.send() right there
- BCreate a class implementing Queueable and Database.AllowsCallouts, started with System.enqueueJob()
- CCreate an @future(callout=true) method that takes List<Order> and call it from the trigger
- DCreate a batch class implementing only Database.Batchable and make the callout in execute()
Show answer and explanation
Answer:B Queueable Apex with Database.AllowsCallouts accepts sObjects and returns a job ID.
Why it is correct
Synchronous callouts are not allowed in a trigger's transaction, so the work has to move to asynchronous processing (1). A Queueable can hold a list of sObjects in member variables (2), and System.enqueueJob() returns the AsyncApexJob ID for tracking (3). Implementing Database.AllowsCallouts lets the Queueable make the callout.
The other options
- ✗ A Making a synchronous callout directly from the trigger fails with a runtime error, so nothing is sent. Sending data from a trigger to an external system always has to go through asynchronous processing.
- ✗ C @future methods accept only primitive types and collections of them, so List<Order> is not allowed, and no job ID is returned. Use it for simple async callouts where passing a set of IDs is enough.
- ✗ D The batch class in D does not implement Database.AllowsCallouts, so the callout in execute() fails. Batch Apex is for processing large data volumes in chunks; implement AllowsCallouts as well when using it for high-volume integration.
Key takeaway
Choosing an async callout: simple work that only needs IDs → @future(callout=true). Pass sObjects or complex state, track by job ID, or chain jobs → Queueable + Database.AllowsCallouts. Chunked processing of large data volumes → Batch Apex + Database.AllowsCallouts.
Try 28 questions like this for free
Most frequent topics
- Visualforce pages and components36 questions
- Implementing Apex triggers27 questions
- Writing SOQL and SOSL queries27 questions
- Developing Lightning Web Components (LWC)25 questions
- Developing Lightning (Aura) components22 questions
- Callouts to external services17 questions
Number of questions per topic among the 277 in this bank (top topics), as classified by itmoshi.
Exam domains
- その他1 questions
- Salesforce Fundamentals28 questions
- Data Modeling and Logic93 questions
- User Interface86 questions
- Integration46 questions
- Testing and Debugging23 questions
← All exams
itmoshi is an unofficial study service and is not affiliated with Salesforce or any exam provider.