Salesforce 組織には 50,000 を超える連絡先があります。新しいビジネス プロセスでは、これらすべての連絡先レコードからのデータを集計する計算が必要です。この計算は、1 日 1 回、営業時間後に実行する必要があります。
これを達成するために開発者はどの 2 つの手順を実行する必要がありますか?
2 つの答えを選択してください
正解:B,C
When dealing with large datasets and the need to perform complex calculations or data aggregation, batch Apex and scheduling are typically used to efficiently process records in batches and to execute the process during off-peak hours.
Option B is correct because using the @future annotation allows you to run methods in the background, but it is not suitable for operations that need to process more than 50,000 records, which is the governor limit for future methods.
Option C is correct because implementing the Schedulable interface allows you to schedule the class to run at specified times, such as after business hours, which is a requirement for this scenario.
Option A is incorrect because Queueable is typically used for chaining jobs and handling asynchronous processing of individual transactions, not for processing large datasets at scheduled times.
Option D is incorrect because the Database.Batchable interface is what's needed for processing large datasets, not Database.Stateful. The Database.Stateful interface is used to maintain state across batch job transactions.
References:
Salesforce Developer Documentation on Using Batch Apex: Using Batch Apex Salesforce Developer Documentation on Scheduling Apex: Scheduling Apex
最新のコメント (最新のコメントはトップにあります。)
The answer is C and D