AX – D365FO – Loop through selected records of a grid with MultiSelectionHelper class #d365fo #ax #msdyn365fo

If a grid has Multselection property enabled you can select more than a record.

If you want to programmatically loop through selected record just follow this code using MultiSelectionHelper class

void clicked() 
   InventItemGroup itemGroup; 
   MultiSelectionHelper helper = MultiSelectionHelper::construct();


   itemGroup = helper.getFirst();
   while (itemGroup.RecId != 0)

       itemGroup = helper.getNext();

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s