Blog

Name is Anant Dubey and the intent to create this blog is to discuss the problems and issues that developer face in the dynamics AX development and to share the new things that come up with the new version of AX.

Friday, February 27, 2015

Get worker's mobile no, email and website in ax 2012

Get worker's mobile no, email and website in ax 2012

static void NamewithDetail(Args _args)
{
    HcmWorker                   hcmWorker;
    DirPerson                   dirPerson;
    DirPartyTable               dirPartyTable;
    LogisticsElectronicAddress  logisticsElectronicAddress;
    ;

    select dirPartyTable where dirPartyTable.NameAlias == "<Worker Name>"
        join logisticsElectronicAddress where logisticsElectronicAddress.RecId == dirPartyTable.PrimaryContactEmail;
        info(strFmt("%1, %2, %3, %4, %5, %6",dirPartyTable.NameAlias,logisticsElectronicAddress.Locator,dirPartyTable.primaryPhone(),dirPartyTable.primaryEmail(),dirPartyTable.primaryFax(),dirPartyTable.primaryURL()));
}

No comments:

Post a Comment