Hi Richard
RW_RMAddrIDinfo() is one of the about 50 RW Functions I added to Dynamics GP v7.0.
The documentation is in the RW_Func.doc in the GP SDK.
Also available from my article:
https://winthropdc.wordpress.com/2008/09/01/using-the-built-in-report-writer-functions/
Here is the parameter information:
function returns string OUT_String;
in 'Customer Number' IN_Customer_Number;
in 'Address Code' IN_Address_Code; { Leave Blank for Default }
in integer IN_Field;
{
IN_Field should use the following values:-
1 = Contact Name
2 = Address 1
3 = Address 2
4 = Address 3
5 = City
6 = State
7 = Zip
8 = Country
9 = Phone 1
10 = Phone 2
11 = Phone 3
12 = Fax
13 = Country Code
14 = User Defined 1
15 = User Defined 2
}
If you want data from the Customer Master record pass in the Customer Number and an empty Address Code (empty string constant).
If you want data from the Customer Master Address record pass in the Customer Number and the Address Code.
I would suggest printing the RM_Customer_MSTR_ADDR.Customer Number and RM_Customer_MSTR_ADDR.Address Code fields to the report as I doubt they have the key data you are looking for, with those values you could also use RM_Customer_MSTR_ADDR.Contact Person to get the data from the record linked by the relationship.
The whole idea of the RW function is to be able to retrieve data from records NOT linked by a table relationship. I would expect the values passed in to be from the SOP_HDR_WORK or SOP_LINE_WORK tables.
Regards
David