Salesforce Certified Platform Developer II — Question 137
Which use case is an appropriate fit for the @future asynchronous Apex method? (Choose two.)
Answer options
- A. A developer has jobs that need larger query results than regular transactions allow
- B. A developer needs to segregate DML operations and bypass the mixed save DML error
- C. A developer has long-running jobs with large data volumes that need to be performed in batches
- D. A developer has long-running methods and needs to prevent delaying an Apex transaction
Correct answer: B, D
Explanation
Option B is correct because using @future allows developers to separate DML operations, thus avoiding mixed save errors. Option D is also correct as @future is designed to handle long-running processes without holding up the main transaction. Options A and C are incorrect because they involve larger data processing needs that are better suited for batch Apex, not @future methods.