Fulfillment Workbench

How to allocate or reserve part through BPM?

probably, set a ud field in order hed/orderline and use it as a trigger point. below reference points from the peers.

A few things to consider:

  • There are many ways to allocate/reserve. Go through the process(es) manually while tracing. Use the trace(s) to model the code and logic. The logic may need to branch based on certain criteria and you should capture and analyze a trace of each branch.

  • Decide on a trigger to invoke the logic. This may be UI interaction or triggered by a state change or other trigger. There may be many ways to trigger.

  • Don’t rule out a customization on the FWB. The advantages are you can leverage the existing data views and adapters. Once you have a model you can form your logic in a customization or BPM. The implication being that the logic triggers from any form(or BPM or function or SC call) in a BPM, whereas in a customization you can control when it triggers more concisely.

For any of this automation, you typically have to get a Trace of the process to know what the screen is sending back to the server. Once you have that, you have to recreate that same logic as BPM widgets or code. Additionally, you can create a Function in the newer versions so there can be multiple ways to trigger the same logic.

I have pasted this code in BPM and getting an assembly reference issue for your ref screenshot is attached below

The code you pasted is for screen customization, i will share you the bpm code later today.

Thanks, @prakash. Actually, we require to Reserve parts for Orders through BPM.

order reservation is done by release level, you need to loop through each release or add all the release to SlimAlloc tableset and reserve in one go.

out of curiosity, is the standard fulfilment workbench not helpful? or whats that your end goal?

anyway , here is a rudimentary code.
Erp.Contracts.OrderAllocSvcContract od = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.OrderAllocSvcContract>(Db);
string ordHed = “OrderHed.OrderNum = “+ordNum.ToString();
oatl = od.GetListOfOrders(””, ordHed, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, 0, 0, out res, Session.CompanyID);

      foreach (var row in oatl.OrderAllocList)

/* bug in my system*/
oat = od.OrderAllocationGetRows(oatl, 0);

if(oat != null )
foreach(var ordRel in oat.OrderAlloc.Where(i=>i.Company == Session.CompanyID ))
Erp.Tablesets.SlimOrderAllocTableset soa = new Erp.Tablesets.SlimOrderAllocTableset();
Ice.IceRow sR = soa.SlimOrderAlloc.NewRow();
sR[“AssemblySeq”] = 0;
sR[“Company”] = Session.CompanyID.ToString();
sR[“DemandType”] = “Order”;
sR[“FulfillmentSeq”] = 1;
sR[“JobNum”] = “”;
sR[“MtlSeq”] = 0;
sR[“OrderLine”] = ordLine;
sR[“OrderNum”] = ordNum;
sR[“OrderRelNum”] = relNum;
sR[“SelectedForAction”] = true;
sR[“TFOrdLine”] = 0;
sR[“TFOrdNum”] = “”;
od.AutoReserve(ref soa, “”, “primaryOnly”, out resreveMsg);
catch (Exception ex)
Epicor.Customization.Bpm.InfoMessage.Publish(" Reservation Error "+ ex.Message + “\n” + ex.InnerException);

1 Like

@prakash, Your support is gratifying. Thank you for your support :+1: