Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Tuesday, June 3, 2014

Code to get the customer city by customer ID in dynamic AX - Relation between CustTable, Dirparty table, logisticAddress table in dynamic AX

Hi,

static void GetCustCityAlfasith(Args _args)
{
    Custtable    Custtable;
    Str Description;
    Str    address;
    ;
    Custtable = Custtable::find("1101");
    info(strfmt("Location : %1",Dirparty::PrimarypostalAddress(Custtable.Party).displayLocationDescription()));
    info(strfmt("City     : %1",Dirparty::primaryPOstalAddress(Custtable.Party).City));
    info(strfmt("Country  : %1",Dirparty::primaryPOstalAddress(Custtable.Party).CountryRegionId));
}

Regards,

No comments:

Post a Comment

FileNameSplit() to slip the Directory, file name and extension in D365 FnO

 Hi,     /// <summary>     /// Validate the Fileformat     /// </summary>     /// <param name = "filepath">FileP...