First You need to insure that Multi Select for Button is True
[FormControlEventHandler(formControlStr(CustFreeInvoice, MultipleSelect), FormControlEventType::Clicked)]
public static void MultipleSelect_OnClicked(FormControl sender, FormControlEventArgs e)
{
MultiSelectionHelper selectionHelper = MultiSelectionHelper::construct();
Set selectedRecords = new Set(Types::Record);
FormRun formrun = sender.formRun();
CustInvoiceTable _CustInvoiceTable = formrun.dataSource().cursor();
CustInvoiceTable myTable;
// super();
FormDataSource _CustInvoiceTable_ds = sender.formRun().dataSource(formDataSourceStr(CustFreeInvoice,CustInvoiceTable)) as FormDataSource;
selectionHelper.parmDataSource(_CustInvoiceTable_ds);
myTable = selectionHelper.getFirst();
if (myTable.RecId)
{
while (myTable)
{
selectedRecords.add(myTable);
info(strFmt("Selected record is %1",myTable.RecId));//Display selected record
myTable = selectionHelper.getNext();
}
}
}
No comments:
Post a Comment