If you can’t wait for a scheduled Apex batch process to run at the scheduled time, you can run the batch process manually.
Required Editions
| Available in: Lightning Experience in Professional, Enterprise, and Unlimited Editions that have Consumer Goods Cloud enabled |
- From Setup, select Developer Console.
- Select Debug | Open Execute Anonymous Window.
-
To run the batch process manually, enter the required Apex classes sequentially.
For example:
cgc_sync.PicklistAttributesMappingBatch picklistbatch = new cgc_sync.PicklistAttributesMappingBatch(); Id picklistBatchJobId = Database.executeBatch(picklistbatch, 100); cgcloud.EffectiveAccountManagerSyncBatch effAccMgrbatch = new cgcloud.EffectiveAccountManagerSyncBatch(); Id effAccMgrbatchJobId = Database.executeBatch(effAccMgrbatch, 100); cgcloud.FlattenAccountHierarchyBatch flattenAccBatch = new cgcloud.FlattenAccountHierarchyBatch(); Id flattenAccBatchJobId = Database.executeBatch(flattenAccBatch, 100); cgcloud.AggregatePromotionBatch aggPrmoBatch = new cgcloud.AggregatePromotionBatch(); Id aggPrmoBatchJobId = Database.executeBatch(aggPrmoBatch, 100); cgcloud.AccountManagerOrgUnitBased accMgrOrgUnit= new cgcloud.AccountManagerOrgUnitBased(); Id accMgrOrgUnitJobId = Database.executeBatch(accMgrOrgUnit, 100); cgcloud.AuthorizationListSetupBatch authListSetupBatch = new cgcloud.AuthorizationListSetupBatch(); Id authListSetupBatchJobId = Database.executeBatch(authListSetupBatch, 100); - Click Execute.
-
To automatically open the log in the Log Inspector, select Open Log.
After the code runs, the debug log is listed on the Logs tab.
- To open the log, double-click it.