TPM_Promotion.DoWork クラス
この APEX インターフェースには、プロモーションが完了して関連レコードがデータベースにコミットされると追加の作業を実行する機能があります。doWork 実行中にエラーが報告された場合は、トランザクションがロールバックされます。
名前空間
1cgcloud実装例
1global class MyAfterCommitWork implements cgcloud.TPM_Promotion.DoWork {
2
3 // This method will be called after the promotion and related record
4 // changes are committed to the database.
5 // If any error is thrown during the execution of doWork, the transaction
6 // will be rolled back
7 global override void doWork() {
8 system.debug('Im here!');
9 }
10}
11
12
13
14cgcloud.TPM_Promotion tpmPromotion;
15
16// Register the work to be performed after the commit
17tpmPromotion.registerWork(new MyAfterCommitWork());