Overview

Why we are doing this???

Sales Order Allocations

summary

  1. Empty the summarized table - GF_DeleteSummarizedItemAllocationBatch

  2. Prepare the item allocation table - GF_UpdateItemAllocationBatch

  3. Generate summarized item allocation records - GF_SummarizeItemAllocationBatch

This is the schedulable class:

GF_SOAllocationAndWhseShiptCreationSched

How to Schedule to Routine

To schedule the routine, run this:

String cron = '0 0 0/1 1/1 * ? *'; //hourly 
GF_SOAllocationAndWhseShiptCreationSched sched = new_GF_SOAllocationAndWhseShiptCreationSched(); 
String jobId = System.schedule('Sales Order Allocation and Whse. Shipt. Creation Job', cron, sched); 

It calls GF_salesOrderAllocationBatch with Batch Size = 1?

To look at all sales orders with Document Status = Open, sort by Order Date.

Then it calls GF_CreateWhseShipmentBatch with Batch Size = 1?

Two fields were created to record errors. (The system will write the error msg to all records if one record fails in the batch) 

  • Allocation_Processing_Error__c 

  • Whse_Shipt_Processing_Error__c