Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

RE: trying to retrieve contact information for current legal entity in ax 2012 bjut code gives blank value

$
0
0

It should work but you need to do "while select", like:

static void AXC_CompanyPhone(Args _args)
{
    DirPartyLocation            dirPartyLocation;
    LogisticsElectronicAddress  electronicAddress;
    CompanyInfo                 companyInfo;
    
    companyInfo = companyInfo::find();
    
    while select dirPartyLocation
        where dirPartyLocation.Party           == companyInfo.RecId
           && dirPartyLocation.IsPostalAddress == NoYes::No
        join electronicAddress
        where electronicAddress.Location == dirPartyLocation.Location
           && electronicAddress.Type     == LogisticsElectronicAddressMethodType::Phone
    {
        info(strFmt("Description: %1, Contact number/address: %2",  electronicAddress.Description, electronicAddress.Locator));
    }
}



Viewing all articles
Browse latest Browse all 175888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>