1) Set the datasource property of the MenuItemButton through which the class will be called. Say we have put an action MenuItemButton on CustTrans form.
2) In main method of class use args.record.datasource() to get the datasource object and save it to a FormDataSource variable using a parm method as below
public FormDataSource parmFormDataSource(FormDataSource _formDataSource = formDataSource)
formDataSource = _formDataSource;
public static void main(Args args)
RT_MultiSelect runb = new RT_MultiSelect();
3) Then loop through the selected records as below
public void run()
custTrans = formDataSource.getFirst(1);
while (custTrans.RecId != 0)
It will print the recids of the records which are selected only.