BPM question - setting UD field on OrderRel to custnum from OrderHed

Hello,

I’m struggling with a BPM and was wondering if anyone can help. I’m trying to copy the CustNum from the OrderHed table to the OrderRel table for a report I’m working on. I’ve run a trace on a newly created order, but I’m not seeing any reference to the OrderRel table in the trace, just the Hed and Dtl tables.

I did attempt a few blind stabs at it using the SalesOrder>MasterUpdate object trying both a pre and post action to set the UD field to the CustNum, but no luck.

Any input or help would be greatly appreciated.

why carry it redundantly on the release level?

2 Likes

if you did decide to duplicate this data then a data directive would be your best bet

We have a customized shipping document that contains the ShipTo, and we often have multiple releases with different ShipTo’s. The report was grabbing the ShipTo from the header. So the shipper is seeing one address on the report, but that address does not match the ShipTo address of the release and the confusion causes some panic which I would like to avoid.

I’m basically looking for any way to pull the ShipTo data from the release table, and it was suggested a BPM to duplicate the data was the best approach.

Thank you, Dan, I’ll give that a try and see if I have more luck than I did with the BPM.

if you’re dealing with a report you can reference the custnum at the header level through linking on your Report Data Definition, don’t write data to support a report solution.

Maybe I am not following but couldn’t you use ShipToCustNum on OrderRel and the ShipToNum for the correct reference?

I can’t find a way to link the OrderRel to the customer, so I end up getting the ShipTo for all of our customers with any given ShipTo number, if that makes sense…maybe I’m missing something?

The OrderRel table has
ShipToCustNum
ShipToNum
Fields which you can use to link to the ShipTo Table.

Thank you, Jose. I had experimented with that during my earlier struggles before revisiting this one and could never get the ShipTo data to populate…still can’t. The only way I’ve ever been able to populate ShipTo data was by linking the ShipTo table to the OrderHed. That issue is what lead me to trying a roundabout way to copy over the custnum to a UD field on the release table.

Here is a screen cap of the query, and the results.