SalesOrder.MasterUpdate Post Processing

I have a post processing BPM on the sales order master update. I’m try to update a UD field after they put some parameters in on the order like ship to zip and country and state I cant get the field to be committed to the database. I can use C# to put it on the table but I don’t see it when i’m still working in the order until I refresh.

I was under the impression that a Post Processing fires after the DB has been updated. Therefore changes to the ttTables don’t have any effect.

1 Like

Okay i figured that was the response i was going to get. Is there something that I can do to update the screen or record set to get UI to pull in the new information after the post process fires?

I don’t recall the details, but I think you have to call BO again after making changes.

And I’m not even sure that will update the UI.

You can use dsHolder.Attach. Something the below after you reference the service will force the refresh. There a few threads on here about it.

var ds1 = svc.GetByID(orderNum)
this.dsHolder.Attach(ds1);

1 Like

Why would you not just change the fields pre-processing on the way to the database so then Epicor handles the refresh?

The reason I’m doing it on the master update my process is checking for when the first line gets added to the order. When i check during a preprocessing rule it is still showing 0.

Is the UD field on the OrderHed or OrderDtl table?

The field im updating is on the orderhed

So you need to determine the value to store in OrderHed.YourField_c, based on info in OrderDtl for OrderLine=1?

that is correct.

Have you thought about doing a data directive on an added row when the line is 1?

so what your saying i can have a orderdtl data directive update a orderhed field? I did not think that was possible given they way data directive functions. But i can test that.

You can’t set the field of another table in a DD.

Why again won’t a pre-proc BOM work?

When im adding the new line or at least in my trace the line number is still line 0. Once the line number gets saved it changes from 0 to 1 in the post process.

Is there not enough info in the dataset in the pre-proc to determine the value of your OrderHed UD field?

Even when OrderLine has a value of 0, the rest of the data should be there.

Okay i will test again and do a trace and may that will work better maybe just missing something. Also i only want this to run for line One and not again. for line 2 and 3 and so on.

Change your test for LineNum = 1 to be (LineNum = 1 OR LineNum = 0)

I have several DD that look at a detail line and set the header with something. You can always get the header if you are in a child record.

I think I’m seeing the problem now.

Using the Set Field widget for UD fields of OrderHed won’t do anything if it wasn’t an OrderHed record that needed updating.