cancel
Showing results for 
Search instead for 
Did you mean: 

formatted search logistic tab

Former Member
0 Kudos

hello,

I have a problem: I want to copy using formatted search, in return document , in logistic tab, the supplier's address and not the warehouse address, this is my query but i'm not able to find the trigger to Taking automatic query, how can i do it?

SELECT T0.[Address], T0.[Street], T0.[ZipCode], T0.[City] FROM CRD1 T0 WHERE T0.[CardCode] = $[$4.0.0]

Accepted Solutions (1)

Accepted Solutions (1)

former_member583013
Active Contributor
0 Kudos

You have to either use the CardCode or DocTotal for the refresh.

In System Init > Document Settings > General Tab......Use Warehouse Address is what drives the warehouse address to be used in all AP documents.

If you want to simply copy the Bill To address shown on the AP Return then you can use the FMS

SELECT $[$6.0.0]

If you want the address from the BP Addresses table then you should use the following Syntax in your SQL to let the Address in the structure on multiple lines

SELECT T0.Address + Char(13) + T0.Street + Char(13) + T0.Block + Char(13) + T0.City + ',  '+ T0.ZipCode 
FROM [dbo].[CRD1] T0
WHERE T0.CardCode = $[$4.0.0] AND T0.AdresType = 'B'

The AdresType determines which Address you want to pick 'B' for Billto and 'S' for Shipto

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

This query will only get you the default BP address. Is this your need?

What do you mean for supplier's address, not the warehouse address? Is it the "Bill to" address you selected?

Thanks,

Gordon