Thursday, 10 August 2017

Get customer email in ax 2012

Get customer email in ax 2012

static void Custermail(Args _args)
{
    LogisticsElectronicAddress          led;
    LogisticsLocation                   ll;
    CustTable                           ct;

    DirPartyLocation     dpl;
    str phone,fax,email,url;
    RecId  RecId;
    ;
    select  ct where ct .AccountNum =='ABC'
    join dpl where ct.Party == dpl.Party
    join led where led.Location == dpl.Location
    && led.IsPrimary == NoYes::Yes
    && led.Type == LogisticsElectronicAddressMethodType::Email;
    {
        email =  led.Locator;
        info(email);
    }
}

No comments:

Post a Comment

Import General journal from excel in D365 F&O

 Hi Guys, Import General journal from excel in D365 F&O Code:  using System.IO; using OfficeOpenXml; using OfficeOpenXml.ExcelPackage; u...