Wednesday, November 22, 2017

THROW,ERROR,TRY,CATCH,:VIKAS,MEHTA,:,DYNAMICS,AX,X++,CODE

THROW ERROR TRY CATCH :VIKAS MEHTA : DYNAMICS AX X++ CODE

If you want the details of the error then in the throw error section of the code replace it by the following code.
This will give you the details of the error in the infolog.

System.Exception ex;
   try
   {
       FormletterService.Run()      
   }
   catch(Exception::CLRError)
   {
       ex = ClrInterop::getLastException();
        if (ex != null)
        {
           ex = ex.get_InnerException();
           if (ex != null)
           {
               throw error(ex.ToString());
           }
         }

}  

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...