OrderRel ShipTo query join

Hi all,

I have a query issue I’ve been struggling with for a while and I’m revisiting the issue.

We have a custom report we provide to our shipping department that displays pertinent order, job, customer and ship to info. The problem is that I’m only able to join the ShipTo table to the OrderHed table, so often the customer address listed is incorrect for the shipment because the order has multiple releases with differing ShipTo’s. The packslip info is correct as it pulls from the release, but it creates confusion.

There doesn’t seem to be a way to link the ShipTo to the OrderRel table because there is no CustNum or ID on the release table and I end up pulling ShipTo info from every customer with the matching ShipTo num.

I can’t help but wonder how the system pulls the ShipTo info from the OrderRel table at the time of shipping…

Any advice? Thank you.

I have run into issues before like this. Sometimes a BPM to populate the required data into a UD field can do the trick.

You probably need to tie back to the Orderhed to get the customer information from there.

Hope that helps.

Thanks for the idea! So far I haven’t been able to populate the UD field on the OrderRel table with the data from OrderHed.

I’ve tried both pre and post directives on the SalesOrder.MasterUpdate BO to set the updated/added field to the ttOrderHed.CustNum with no condition.

I’ll keep trying different methods, but is that the basic approach you would suggest?

Hello, sorry this is an old post, I felt it was necessary content for the community.

I ran into the same issue as well, I found the solution.

You are right OrderRel does not have CustNum. BUT, it does have ShipToCustNum.
I am on Kinetic 2022.1.8, so I dont know if E9 didnt have this field. Regardless, i was pulling my hair out trying to figure this out.