Sunday, May 28, 2017

Get Caller Form name and caller name in AX Table,AX Class method ax 2012

//Get Caller Form name and caller name in AX Table method ax 2012
FormDataSource fds;
FormName fn;
FormRun     caller;
if (this.isFormDataSource())
{
    fds = this.dataSource() as FormDataSource;
    if (fds)
    {
        fn = fds.formRun().name();
 caller = fds.formRun().args().caller();
            if(caller.args().name() == formStr(<Form Name>))
            {
                //logic
            }
    }
}

2 comments:

  1. In which Table method we should use this code?

    ReplyDelete
  2. Any table method. I have checked in ModifiedField emthod

    ReplyDelete

Upload data from Excel in D365FO X++

 Action Menu Item: SAN_UploadExcelData Object type: Class Object: <Controller class name> Label: <> Class: Controller class clas...