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();
    }

posted @ 2016-12-22 15:15  Fog-Fog  阅读(221)  评论(0编辑  收藏  举报