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

Convert Call stack to readable format in D365FO X++

//Input --container _xppCallStack = xSession::xppCallStack();  Public static str POL_formatXppCallStack(container _xppCallStack, int _skipFr...