Attn Contact on OrderHed - How can I get this?

Hello All,

Does anyone know how to get the contact on the OrderHed listed as the “Attn”?

I can’t seem to find the join between the tables that returns the exact contact listed on the orderhed.

There’s two… One for Sold To
OrderHed.PrcConNum
and ShipTo
OrderHed.ShipConNum

These both link back to the CustCnt table via Company, CustNum , ShipToNum,ConNum

1 Like

Hey @josecgomez, I did look into that, but what I am finding is that the PrcConNum are all contact nums who are linked as a contact on the customer not as a contact on a Ship To meaning that they do not have a ShipToNum. Alternateively, the ShipConNum does link via Ship To is my guess. I haven’t confirmed it yet.

If the shitptonum is blank that’s ok. That’s one of the keys on that table.

-Jose

@josecgomez what I am finding is that all of the contacts for PrConNum are the contacts listed under the customer that do not have ShipTo Numbers so if your order has a shipto number you will return the wrong contact or no contact at all of you join on ShipToNum to find the PrcConNum.

You would use the shipto num for the ShipConNum, but not the PrcConNum.

I don’t think any of the contacts listed under any shipTo number populate the dropdown where the PrcConNum is chosen and therefore you wouldn’t use a ship to num to find the PrcConNum, instead I think would join the CustCnt on OrderHed.Company,OrderHed.CustNum,OrderHed.PrcConNum where CustCnt.ShipToNum = ‘’. Maybe it is some weird customization on our environment (has happened before), but I only get contacts who’s ship to num is blank to pop up in the drop down where the PrcConNum is chosen, regardles of what the ShipToNum is on the order.

1 Like

Correct one is for the sold to and the other is for the ship to.

It seems like when I try to join the OrderHead.PrcConNum to CustCnt by Company, CustNum, ConNum, I’m getting this ShipTo contact as well.

If I add a constraint for ShipToNum = ‘’, I get the expected results.

Am I the only person seeing this? It feels like there should be another constraint to join properly on the Purchasing Contact.