Update child table UD value from change of parent UD value

I have added custom fields to OrderHed, OrderDtl, and OrderRel. I am trying to cascade the value from OrderHed to OrderDtl, and then to OrderRel. Using a method directive on Erp.BO.SalesOrder.GetNewOrderDtl and Erp.BO.SalesOrder.GetNewOrderRel, I can flow the value down if it was set at the OrderHed when the lines and releases were created. However, at times, the information is not available when the Sales Order is entered, and the information needs to be added later. I have tried using a method directive on the Erp.BO.SalesOrder.Update, but I have no records in the ds.OrderDtl or ds.OrderRel datatables when the value was changed in the ds.OrderHed. In E10, I would have done a form customization to repopulate the EpiDataViews, but I cannot seem to figure out how this would be done in Kinetic. Any directions to the rabbit hole are appreciated.

I think you should be using MasterUpdate.

In the BPM, you can step through everything you would be doing in the UI and do that. So getBYID etc. Make the change manually with tracing on, then call the same methods that Epicor calls.

I would make sure your conditions are set well to only do this when you need to, as it’s probably going to slow things down a bit.

But that’s all doable server side.

I have tried using MasterUpdate as well. The problem is that when I change the UD field in OrderHed, the payload for the save only populates the ds.OrderHed and ds.TaxConnectStatus (which I don’t need). The ds.OrderDtl tableset is empty. If I am saving a change at the Line level, only ds.OrderDtl and ds.TaxConnectStatus is populated. Somehow, I need to get ds.OrderHed and all of the ds.OrderDtl record populated so that I can read the values from the header and compare to the line values to see which lines need to be set.

I think you must be looking at something wrong. I just opened order entry, opened a sales order, made a change only to the header, and saved.

The dataset is complete, with OrderDtl populated.

Let’s get this out of the way. You should have a pre-processing directive on
Erp–> SalesOrder → MasterUpdate.

That dataset should have everything you need.
OrderHed, OrderDtl, OrderRel.

And if you are tracing to look at it, you should be selecting:

Write Full DataSet
Write Response Data

I did mine in classic, let me see what happens in the browser.
BRB

They’ve made a breaking change from Classic To Kinetic.
In classic, that data is always sent, in Kinetic, they aren’t passing it if it doesn’t change.

Your best bet is to pull the detail in code or widgets, and fill the dataset for OrderDtl.

Read the post above. Master Update calls Update.

I ran a check on Master Update post processing to see if it would be available, but
alas, no. (Of course, it may call update before post anyway - didn’t check)

If you need help, I can show you how to pull the data yourself in code and drop it in.

I have always done this with a pre processing to trigger and a post processing to reach back asynch to the header and get the updated field(s) for the detail and releases.

Either way he’s going to have to do the retrieval work himself :slightly_frowning_face:

1 Like