Loading
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          The GroupAssignmentBatchable Job (Managed Package)

          The GroupAssignmentBatchable Job (Managed Package)

          Run the GroupAssignmentBatchable job to perform group record rollups in batches. If you defined rollup settings for objects (using the Record Rollup Configuration custom setting), you can use the RecordRollupConfig method to run the GroupAssignmentBatchable job. The RecordRollupConfig method lets you perform group record rollups for one or more objects at a time.

          Required Editions

          Available in: Lightning Experience
          Available in: Professional, Enterprise, and Unlimited Editions

          Managed Package Icon This is a Financial Services Cloud managed package feature.

          For All Objects, With Rollup Settings

          To run the job for all objects with rollup settings defined in the Record Rollup Configuration custom setting, use this code.

          Database.executeBatch(new FinServ.GroupAssignmentBatchable());

          For One or More Objects, Overriding the Rollup Settings

          To run the job for one or more objects, overriding the custom rollup settings, you must construct new instances of the FinServ.GroupAssignmentBatchable.RecordRollupConfig class and pass them 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)
          
          //Constructor 2:
          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);
           
          Loading
          Salesforce Help | Article