AX 2012 MultiSelectionHelper (取多条记录)
Args args;
FormRun formRun;
MultiSelectionHelper selection;
SNY_CustConsInvoice_Input CustConsInvoice_Input;
;
args = new Args(formstr(SNY_CustConsInvoiceCreate));
formRun = classFactory.formRunClass(args);
formRun.init();
formRun.run();
formRun.wait();
selection = MultiSelectionHelper::createFromCaller(formRun);
CustConsInvoice_Input = selection.getFirst();
info(CustConsInvoice_Input.Z_InvoiceAccount);
while (CustConsInvoice_Input)
{
//do something
CustConsInvoice_Input = selection.getNext();
}