14 November 2021

Exception handling in D365 FO - Capture the exception

System.Exception        ex;

 try

{

    // total logic

 }

            catch(ex)

            {

                System.String messageEx = ex.Message;

                info(strFmt("Exception: %1",messageEx));

            }

            catch (Exception::CLRError)

            {

                ex = CLRInterop::getLastException().GetBaseException();

                error(ex.get_Message());

            }

No comments:

Post a Comment

Give me the commetns and solutions

Ledger Voucher creation Framework and x++ code to create ledger voucher

 Please click her for MS reference file Below is the out of the box example reference and code. SalesInvoiceJournalPostSubBill_Extension->...