Salesforce Certified Platform Developer II — Question 235
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.)
Answer options
- A. Use the @future annotation
- B. Implement the Schedulable interface
- C. Implement the Database.Batchable interface
- D. Implement the Queuable interface
Correct answer: B, D
Explanation
The correct answer includes B, which allows scheduling of apex classes to run at a specified time, ideal for daily tasks. D is also correct, as the Queueable interface allows for asynchronous processing of jobs, which can be scheduled as well. Options A and C are not suitable for this requirement; @future is limited to short tasks and Database.Batchable is typically used for processing large volumes of records in batches rather than scheduled executions.