how to show selected form grid records in info method in X++
override the clicked method and paste the following code inside the method
MultiSelectionHelper selectionHelper = MultiSelectionHelper::construct();//Create instance of class
Set selectedRecords = new Set(Types::Record);//Declare a set of type record
Employee tableLines; //Your table buffer
super();
selectionHelper.parmDataSource(Employee_ds); //Set the datasource
tableLines = selectionHelper.getFirst(); //assign to table buffer the reference to selected record(s)
if (tableLines.RecId)
{
while (tableLines)
{
selectedRecords.add(tableLines);
info(strFmt('Selected record.. %1',tableLines.EmpID));//Display selected record
tableLines = selectionHelper.getNext();
}
}
Comments
Post a Comment