Trying to automate Fulfillment Workbench Order Allocation By Lot Bin for PCID

I’m in the process of trying to do some quick automation to the Fulfillment workbench Order Allocation by Lot/Bin to automatically assign the order line to a PCID it is assigned to without having all the allocation screens display. The relationship for this is stored in UD fields of pkgControlItem and I have the code working that establishes whether the relationship exists or not.

It is actually executing the Order Allocation portion that has me banging my head. Basically from the main screen, after selecting the orders to process, I add a button and when clicked determines if the selected line is associated to a PCID or not. As I said previously, I have this part of the mod working.

Using a trace of the manual process, I am trying to mimic this in a customization to process each line selected. However, the definition for the methods used and what you can do in a customization do not match.

For example the first method the OrderAllocationAdapter calls is CheckDates. The trace shows that it requires an dataset named SlimOrderAlloc and the BL Tester confirms that.
However, in a screen customization you do not have the option to provide this dataset.
It simply wants you to use the following syntax:
Boolean [varName] = [varAdapterName].CheckDates(cMessageText);

where cMessageText is an output. Running this from a customization returns true all the time, so I am not confident it is doing anything. If I try to pass the dataset to it, I receive an error. I found that every method was the same, BL Tester states a dataset is required, but the screen Customization’s Object browser states you don’t need one.

First question. When I went to class for customizations, the instructor sang the praises of the BL Tester and doing traces to determine what adapter and method to use. However, in this case, the calls the screen customization can do using the same methods do not match the BL tester definitions. Why does Epicor do this? Seems to limit what we can do effectively. They should stick with their standard and ensure the mthods called from a screen customization match what the BL Tester is showing.

Next question. How can I work around this inconsistency to get this screen to automate properly and set the allocation to a related PCID? I’m not sure the autoAllocate would work with PCIDs, but I’ll research that some more. I’m not sure a BPM will be possible for the customization requirements as the users do want to deal with the screens that pop up during the standard allocation process. Thus the request for an automated process. Has anyone done this type of modification yet?

Well I thought I was getting a bit farther. It seems the order allocation methods may be using the data from the epidataviews. Doing a trace of allocation by Lot/Bin, I saw it was calling 4 methods. Writing code to mimic this I was able to successfully execute the first two methods. However, on the third method (OrderAlloc.GetLotBinOnHandByWhseCodeZoneBinType) I keep getting an error of “You must select on Demand record.” Using the same data I had in the trace for the successful allocation with the BL Tester, I also received this same message thought it worked on the client. First, for those familiar with the allocation process, what does this message mean? There is no parameter on the method to pass a Demand Type, so does this need another method to have it set? With no source code for this adapter or documentation, it is very difficult to work with, so any assistance would be appreciated.

Additional notes. For some strange reason, this is one of those data adapters that you instantiate once and run the various methods. However, even doing this still results in the message “You must select an on Demand record.” when the method GetLotBinOnHandByWhseCodeZoneBinType is executed.

Comparing a trace from the standard client process and the customization, I see no diffierence in the data that is passed to the adapter methods. From the message, there seems to be something being set somewhere that informs the Epicor client that a Demand has been selected. What that is I haven’t the faintest clue and a trace doesn’t show what this might be.

Hi,
Did you ever get a solution to this? I have been at it for a while now but still ending up at “You need to select one demand record.”

It was a bit of work but I finally figure out a way to do it. It took a combination of screen customizations and BPMs to do it.

Hello, would you mind elaborating? Specifically how you resolved the “You need to select one demand record” error? Currently my OrderAllocTableset has records in the OrderAllocSupply table. I pass the Dataset to GetLotBinOnHand but the error occurs. How do I signify which demands (OrderAllocSupply records?) to process?

@Peterson_Wachira

I resolved the “You need to select one demand record.” error. The details are here:

Much appreciated!

1 Like