AX – D365FO – Loop through selected records of a grid with MultiSelectionHelper class

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(); helper.parmDatasource(InventItemGroup_DS); itemGroup = helper.getFirst(); while (itemGroup.RecId != 0) { info(itemGroup.ItemGroupId); itemGroup = helper.getNext(); } }

D365FFO – AX – X++ – How to: Pass multiple data source records to Class with MultiSelectionHelper

Good day everyone, Today I will continue talking about how to pass multiple records to class, this time I will do it using the helper class MultiSelectionHelper. The MultiSelectionHelper class provides an interface to work with multiple selected records on a form data source and which can be cached, if called on server it will … Continua a leggere D365FFO – AX – X++ – How to: Pass multiple data source records to Class with MultiSelectionHelper

D365 / AX – X++ – How to get multiple selected records in control level event handlers

Purpose:The purpose of this document is to show how to get multiple selected records in form control event handlers. Development:First of all create new event handler class HRPayrollPayStatementEventHandler and subscribe to form button OnClicked event handler. /// /// The HRPayrollPayStatementEventHandler class is the event handler class for managing PayrollPayStatement form events ///class HRPayrollPayStatementEventHandler{ /// <summary> … Continua a leggere D365 / AX – X++ – How to get multiple selected records in control level event handlers