X++ code how to get inner exception or error in AX 2012 D365FO


try{
}

catch(Exception::Error)
        {

            Microsoft.Dynamics.Ax.Xpp.ErrorException ex;
            str errorMsg;

            ex = new Microsoft.Dynamics.Ax.Xpp.ErrorException();
            errorMsg = ex.Message;

            throw error(strFmt("%1",errorMsg));
        }

Comments

Popular posts from this blog

x++ code to add hyperlink to a field in D365FO

x++ code to get Vendor Email Address based on Purpose in Dynamics 365 for Operations

x++ code to get Customer Address based on purpose in ax 2012