Record rollup batch job execution
GroupAssignmentBatchable
Option 1
To execute the job for all objects with configuration defined in the custom setting use the following signature.Database.executeBatch(new FinServ.GroupAssignmentBatchable());
Option 2
To execute the job for one or more objects with overridden settings, New instances of class FinServ.GroupAssignmentBatchable.RecordRollupConfig need to be constructed and passed to FinServ.GroupAssignmentBatchable.runRecordRollupJob(List<FinServ.GroupAssignmentBatchable.RecordRollupConfig> recordRollupConfigs).FinServ.GroupAssignmentBatchable.RecordRollupConfig provides two constructors:
//startTime, endTime and scope can be set to null.
//When set to null value the values are read from the custom setting.
//Constructor 1:
RecordRollupConfig(String objectName, Datetime startTime, Datetime endTime)
//When set to null value the values are read from the custom setting.
//Constructor 1:
RecordRollupConfig(String objectName, Datetime startTime, Datetime endTime)
//Constructor 2
RecordRollupConfig(String objectName, Datetime startTime, Datetime endTime, Integer scope)
RecordRollupConfig(String objectName, Datetime startTime, Datetime endTime, Integer scope)
Sample code:
FinServ.GroupAssignmentBatchable.RecordRollupConfig recordRollupConfigFinancialAccount =new FinServ.GroupAssignmentBatchable.RecordRollupConfig('FinancialAccount__c', DateTime.newInstance(2009, 3, 4, 21, 2, 2), null, 500);
FinServ.GroupAssignmentBatchable.RecordRollupConfig recordRollupConfigCase =new FinServ.GroupAssignmentBatchable.RecordRollupConfig('Case', null, null, null);
List<FinServ.GroupAssignmentBatchable.RecordRollupConfig> recordRollupConfigs = new List<FinServ.GroupAssignmentBatchable.RecordRollupConfig>{recordRollupConfigFinancialAccount, recordRollupConfigCase};
FinServ.GroupAssignmentBatchable.runRecordRollupJob(recordRollupConfigs);
No comments:
Post a Comment