Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Step 1: The system will automatically allocate inventory for orders where Document Status = ‘Open’ and Allocation Status != ‘Full’.

    • If the allocation process fails, the system will write the error message to the Allocation Processing Error field.

    • Class Reference: GF_SalesOrderAllocationBatch

  • Step 2: The system will automatically create warehouse shipments for orders with Document Status = ‘Open’ and Allocation Status = ‘Full’.

    • If the creation of the warehouse shipment fails, the system will save the error message to the
      Whse. Shipt. Processing Error field.

    • Class Reference: GF_CreateWhseShipmentBatch

  • The above processes are scheduled to run hourly and are controlled by the scheduler class GF_SOAllocationAndWhseShiptCreationSched

    • To Schedule the routine to run hourly, use the following command:

      Code Block
      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); 
      

Sales Order

...

Allocation Challenge

Issue:

AdMagic states that they will have more than 50,000 order lines with the same item in the same warehouse open at any given time, especially for those Kickstarter items. This will cause the out-of-the-box GFERP allocation routine to fail because the routine calculates the item quantity available by subtracting the item Quantity on Hand from the quantity allocated. The system accomplishes this by looping through all allocation lines, which will trigger a 'too many query rows' error, a limitation imposed by Salesforce governor limits. Salesforce restricts querying up to 50,000 rows per transaction.

...