January 05, 2015

X++ code to get the Phone Number of the Delivery Address in the Purchase Order in AX 2012

static void getphoneNumber(Args _args)
{

PurchTable purchTable;

LogisticsLocation logisticslocation;

LogisticsPostalAddress logisticsPostalAddress;
   

select purchTable where purchTable.PurchId=="000020";

select logisticslocation where logisticslocation.ParentLocation =
LogisticsPostalAddress::findRecId(purchTable.DeliveryPostalAddress).Location;

info(LogisticsElectronicAddress::findByLocation(logisticslocation.RecId).Description);

info(LogisticsElectronicAddress::findByLocation(logisticslocation.RecId).Locator);

 
 

1 comment:

  1. Thank you for helping people get the information they need. Great stuff as usual. Keep up the great work!!! Modern Behaviour WA

    ReplyDelete