Alfasith AX

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

Saturday, October 25, 2014

Code to get multi selected records in from grid in AX

Hi,

Make that object (button) to multiselect property as "YES".
on the control (button) event method (Clicked).

void clicked()
{

     int             ListOfRecIds, i=1;
    container  contains;
    CustTable  custTableLoc; // Table_Name  that we used in as the datasource.
    super();
   
    ListOfRecIds= custTable_ds.recordsMarked().lastIndex();
    custTableLoc= custTable_ds.getFirst(1);
   
   while (custTableLoc)
    {
        contains = conIns(container, i ,custTableLoc.AccountNum)
       custTableLoc = custTable_ds.getNext();
        i++;
    }
 }
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...