Add ShipToAddress Phone Number to Pack List Summary

SOLVED

I'm trying to add the customer's Ship To Address PHONE NUMBER to the sozrg002 Crystal.

It seems obvious that it needs to come from the tciContact table.  I haven't found the magic combination of tables and links to make it work.  It seems like it would be a pretty standard request wanted by most companies that use the Pack List Summary.  Has anyone here tackled this one before?

Thanks.

Using Sage 500 7.40.5

  • 0
    verified answer

    Ralph,

    Try this and replace the ? with an order number to see if it grabs the data you expect. This is grabbing the default ship to from the header though. Technically, there could be a different ship to on each line.

    SELECT Phone
    FROM dbo.tsoSalesOrder
    JOIN dbo.tarCustAddr ON dbo.tsoSalesOrder.DfltShipToCAddrKey = dbo.tarCustAddr.AddrKey
    JOIN dbo.tciContact ON dbo.tarCustAddr.DfltCntctKey = dbo.tciContact.CntctKey
    WHERE TranNo='?'

  • 0 in reply to Tim Rodman

    That did it, Tim!   I just had to set the link between tarCustAddr and tciContact to be 'Full Outer Join.'   Thanks!