How To: Refresh calling form

刷新调用窗口数据

public void close()
{
     FormDataSource          fds;
     d_SparPartsTable = element.args().record();
    
    super();
    
    if (d_SparPartsTable .isFormDataSource())
      {
        fds = d_SparPartsTable.dataSource();
          
        if (fds)
        {
            fds.executeQuery();
        }
    }
}
 /*
    #Task
    FormRun formRun;

    super();

    // Get an instance of the calling form.
    formRun = element.args().caller();
    // If the caller is a form, refresh that form.
    if(formRun)
      {
        formRun.task(#taskF5);
      }
 */

Class刷新方式:

classDeclaration:

FormDataSource                      formDataSource;

main:

dialog.parmFormDataSource(args.record().dataSource());

parmFormDataSource:

FormDataSource parmFormDataSource(FormDataSource _formDataSource  = formDataSource)
{
    formDataSource = _formDataSource;

    return formDataSource;
}

active:

 #Task

    if (dataSource.formRun())
    {
        formDataSource.formRun().task(#taskF5);
    }


    Danzel
    Danzel管理员

    • 声明:本文由Danzel于2020-11-02转载(优化),转载须经原站同意并注明出处。
    • 本文地址:http://maryd.cn/?id=127
    上一篇:How to check if multiple rows have been selected in a grid
    下一篇:Dynamics ax 2012 Form Field allow edit based on conditons

    留言评论

    暂无留言
    取消
    扫码支持