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

Dynamically setting entire Form security access through Extension in D365FO

/// <summary> /// To check if user can get access to the Parameter form /// </summary> class SAN_ParamFormsAccessCtrl {     prot...