BAQ for the Ship To field

I am trying to include the customer Ship To field in a BAQ. The help indicates it is keyed off the OrderHed.PrcConNum being related to the CustCnt.ConNum.

My problem is that those are not unique for a given company.

image

What key field am I missing?

Because the customer can have a contact person and the shipto can have a contact person, you will need all three fields to get the contact person into the BAQ.

To add to what Charlie said, if you open the Data Dictionary Viewer, it will show the primary key any given table uses in the database.

Table ShipTo contains all the shipto’s. It contains the primary (which does not contain a shiptonum which corresponds of the address added in the client form detail panel ) and any other shipto’s added under shipto tab.

There is a field also indicating the primary ship contact (PrimSCon ) where in the CustCnt table would be ConNum corresponding to (CustNum + ShipTonum + ConNum ) combination.

So, your result show
first line = the extra shipto id 773, of the custid 609 having ConNum = 1
2nd line = cust 609 having an extra contact
3rd line = cust 609 with a first contact.
So 1 or 2 should be the PrimSCon…

Hope this helps you !

Thanks Pierre. When I joined on ShpConNum instead of the PrcConNum it worked.
image

Actually, now it is just showing the contact in the Ship To pane, but that is duplicate for us, so this is good enough.