Hello all,
I am trying to do a little bit of automation of fulfillment workbench. I have started an Epicor Function that performs an “inventory transfer” and “allocation” for pieces in a given lot. For now, I am concentrating on implementing only the “allocation” step. Here’s roughly what I’m trying to achieve:
For a given qty of a given lot:
- AllocateByLotBin() such that either all orders are filled or the lot is fully allocated.
- AutoAllocate() to dip into inventory to fill orders if needed/possible
So far I have identified most of the chain via traces, but I’m stumped at an error that’s occurring when I call Erp.OrderAlloc.GetLotBinOnHand().
Error Details:
{
"Message": "You need to select one demand record.",
"Type": "Error",
"Program": "Erp.Services.BO.OrderAlloc.dll",
"Method": "GetLotBinOnHand",
"ColumnNumber": 17,
"LineNumber": 5511
}
BO Methods:
- Erp.OrderAlloc.GetListOfOrders()
- Erp.OrderAlloc.OrderAllocationGetRows()
- Erp.OrderAlloc.Recalculate()
- Erp.OrderAlloc.CheckDates()
- Erp.OrderAlloc.OneDemandType()
- Erp.OrderAlloc.GetLotBinOnHand() <---- Error
It seems after OrderAllocationGetRows() I have an OrderAllocListTableset with the expected record in the “OrderAlloc” table. Next, I pass the OrderAllocListTableset to Recalculate() which appears to clear the “OrderAlloc” table and add to the “OrderAllocSupply” table. The problem now is that I need to pass the OrderAllocListTableset to GetLotBinOnHand() in order to return the available lots, but there is no “select” field on the “OrderAllocSupply” table for me to indicate which “demands” to select and satisfy the error.
Any ideas?
Background: We have developed a custom application used in the last operation of one of our processes. We’ve already integrated an Epicor Function that automatically creates the labor transactions at the end of the operation which results in the lot being transferred into inventory. The next step is to put the product away in an inventory bin. We used to place the inventory at a designated bin location until a sales manager allocated the material to an order via fulfillment workbench, prompting a picker to pick the pieces. However, “almost” everything we do is “build-to-order” so at the time the material is being placed in inventory, the demand already exists and we know what order it should be going to. Thus, if we were able to “allocate” and “transfer” the inventory at the end of the last operation, we could direct the “placer” to deposit the material in a staging bin corresponding to the order.
Reference to a similar posts: