Salesforce Certified Platform Developer II — Question 47

A developer has been asked to create code that will meet the following requirements:
Receives input of: Map<Id, Project_c), List<Account>
Performs a potentially long-running callout to an outside web service
Provides a way to confirm that the process executed successfully
Which asynchronous feature should be used?

Answer options

Correct answer: D

Explanation

The Queueable interface is suitable because it allows for asynchronous processing and can handle complex operations, including long-running callouts. The @future method has limitations regarding handling complex data types, while the Database.AllowCallouts interface is not a standalone feature for executing asynchronous tasks. The Schedulable interface is designed for scheduled tasks, not for handling callouts directly.