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,

Sunday, June 1, 2014

Appreciate to Microsoft developers for un-imaginable very easy concept in Dynamic AX - Complete intitialization, condition & incrementation as datasource in Dynamic AX

Hi,

Ref:
Form vendInvoiceJournal
method:printTaxUnrealizedInvoice


Here initialization as first record in the data source;
condition as complete data source;
increment as next record in the data source;

    for (vendInvoiceJourLocal = getFirstSelection(vendInvoiceJour_ds);
         vendInvoiceJourLocal;
         vendInvoiceJourLocal = vendInvoiceJour_ds.getNext())

//Brilliant Microsoft developer developed above syntax- but very simple which we cant imagine on normal

Regards,

How to invoke and iterate List as Contract methods in AX 2012/ D365

Hi, Public void performContractIterate(ClassContainsListAsContract    _ListCarryClass) { List contractFieldList = new List(Types::Class); ...