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

SQL code to upate one Legal entity banner to all the legal entity in D365

 Hi, update companyimage set  companyimage.Image  = companyimageA.Image  from  ( select Image from companyimage where dataAreaid = 'USF...