Salesforce
PDII · Question #283
A company uses Opportunities to track sales to their customers and their org has millions of Opportunities. They want to begin to track revenue over time through a related Revenue object. As part of…
The correct answer is D. Use Database.executeBatch() to invoke a Database.Batchable class. See the full explanation below for the reasoning.
Question
A company uses Opportunities to track sales to their customers and their org has millions of Opportunities. They want to begin to track revenue over time through a related Revenue object. As part of their initial implementation, they want to perform a one-time seeding of their data by automatically creating and populating Revenue records for Opportunities, based on complex logic. They estimate that roughly 100,000 Opportunities will have Revenue records created and populated. What is the optimal way to automate this?
Options
- AUse System.enqueueJob() to invoke a Queueable class.
- BUse Database.executeBatch() to invoke a Queueable dass.
- CUse System.scheduleJob() to schedule a Database.Scheduleable class.
- DUse Database.executeBatch() to invoke a Database.Batchable class.
How the community answered
(51 responses)- A2% (1)
- B6% (3)
- C8% (4)
- D84% (43)
Community Discussion
No community discussion yet for this question.