In my continuing saga to automate the Epicor 10 Fulfillment screen, I have successfully mimicked the steps the screen executes to allocate by Lot/Bin each line in the grid. I am finally to the final step of actually doing the allocation step (OrderAlloc.AllocateByLotBin). From Epicor’s Object Browser, it looks like a pretty straight forward call. However, like OrderAlloc.GetListOfOrders, it isn’t straight forward and isn’t properly documented.
When I execute it, I receive a message stating “underlying provider failed on enlisttransaction”. Does this method require a transaction or am I missing something else in order to execute this that isn’t apparent? An online search doesn’t come up with anything concerning this error and an Epicor screen customization, so this appears to be a pretty rare issue.
Well I did find a solution, but I had to use a combination of the customization and a BPM to get it to work. I also bent the rules a bit and had the BPM update the necessary tables directly to complete the goal.
I know Epicor frowns on that, but when their data adapter isn’t working as expected and isn’t well documented, you have to do what you can with the tools provided.
OK, got it. I was able to get the error that you were getting. In the call to OrderAlloc.AllocateByLotBin, these were the minimum things that I needed to set in the dataset:
PartAllocLot[x] table (where x is the row that you want to allocate from)
Allocate - set to true
NewAllocatedQty = int
PartAllocTran table
ReleaseToPicking= true
Adhoc = true
RowMod = U
I think the thing that solves the error is making the PartAllocTran row dirty by changing a field. In my business case we want to release to Picking, and we don’t use allocation templates so changing these 2 fields to true makes the row U state and all is happy.
Thank you! I also found this morning that the Tran columns need to be set entirely.
Also, it’s either initiate all the columns or use the getlist then OrderAllocationGetRows to pre-fill it. I’m working on this now and will report back.
I was able to follow through what you have above and was able to allocate a LOT. The allocation shows up successfully in the PartAlloc table. However, the part bin record is not updating.
Scratch that. I was adding a row to the PartAllocLot instead of using what was returned …
EDIT:
I was able to skip GetLotOnHandByWhseCodeZoneBinType and create my own PartAllocLot row from a baq. The key is to make sure to specify the warehouse on the AllocateByLotBin call. That makes the PartBin record update.
Also, the PartAllocTran column for Adhoc is “AddHoc” in the datatable… this threw me a few times
Did you get this to work fully? I’m trying Allocate by Lot in a BPM - no errors just nothing in the PartAlloc Table. Not the prettiest bit of code as I am hacking away at gettng an example working. Any ideas where I am goiong wrong?
Yep I did. It doesn’t look like you’ve implemented what I suggested above from the code you have there.
You need to deal with the PartAllocTran table as well as PartAllocLot table.
OK, got it. I was able to get the error that you were getting. In the call to OrderAlloc.AllocateByLotBin, these were the minimum things that I needed to set in the dataset:
PartAllocLot table (where x is the row that you want to allocate from)
Allocate - set to true
NewAllocatedQty = int
PartAllocTran table
ReleaseToPicking= true
Adhoc = true
RowMod = U
Thanks for the quick response - sorry I didn;t post the whole code - I did implement what you suggested - just no records are created.
Apologies in advance again - the code is a mess whilst I work out what I’m doing wrong: