Schedules one or multiple account plan categories for batch
calculation. It accepts up to 1000 account plan categories and schedules them for
calculation.
Resource
SCHEDULE_ACCOUNT_PLAN_CATEGORY_CALC
Available version
55.0
Apex Request Example
// name of the salesorg for which the job should be scheduled String salesOrg = '0001'; <namespace>.ScheduleAccountPlanCategoryCalcCallout callout = new <namespace>.ScheduleAccountPlanCategoryCalcCallout (salesOrg); // Log Transaction Id String txId = <namespace>.TransactionHandler.getTransactionIdentifier(); // Job object <namespace>.Job job = new <namespace>.Job(); job.JobChainName = 'TPM_Calculation_Chain_<timestamp>'; job.JobName = 'AccountPlanCategoryCalculation'; job.BatchChainType = 'default'; job.JobThreads = 25; // ⚡ ADD: Number of parallel workers (default: 5, max: 25 on production/full copy sandbox, 3 on other sandboxes) // Account Plans in Scope List<cgcloud__Account_Plan_Category__c> accountPlanCategoriesToCalculate = [ SELECT Id FROM cgcloud__Account_Plan__c // WHERE cgcloud__Account_Plan__r.cgcloud__Sales_Org__c = :salesOrg // AND ... ]; <namespace>.OffplatformCalloutResponse response = callout.execute(txId, job, accountPlanCategoriesToCalculate, options); if (response.status != 200) { // Handle error }