Saturday, April 23, 2016

X++ code for calling Multiple selected records in ax 2012

First Create A form with SalesTable as datasource drag some fields to form grid,and create a new button a design level ,keep its Multiselect property as YES and write the clicked method as below



void clicked()
{
    int             recordsCount;
    SalesTable     SalesTable1 ;
    super();
 
    recordsCount = SalesTable_ds.recordsMarked().lastIndex();  // Total number of marked records.
    SalesTable1    = SalesTable_ds.getFirst(1);
 
    while (SalesTable1 )
    {
        info(SalesTable1 .CustAccount);
        SalesTable1 = SalesTable_ds.getNext();
    }
}

No comments:

Post a Comment

Export a copy of the standard user acceptance testing (UAT) database

 Reference link: Export a copy of the standard user acceptance testing (UAT) database - Finance & Operations | Dynamics 365 | Microsoft ...