Thursday, 24 May 2012

How to merge and get vendor master/ customer master address using X++ code in AX 2012

In AX 2012 there is method formatAddress in LogisticsPostalAddress table. This method will merge all the details of the address. In my case I was updating the vendor address so I created a job as shown below:


//Something like this:

logisticsPostalAddress.Address = logisticsPostalAddress::formatAddress(logisticsPostalAddress.Street,
                    logisticsPostalAddress.ZipCode,
                    '',
                    logisticsPostalAddress.CountryRegionId,
                    '',
                    '');
logisticsPostalAddress.update();

No comments:

Post a Comment