26 November 2021

Try catch exception example in D365FO

 class TestClass

{

    public static void main(Args args)

    {

        PurchTable purchTable;

        

        System.Exception ex;

        

            //Counter cnt = 1;

            while select purchTable

            {

                try

                {

                    //doing updation on  the purchatable.

                }


                catch(ex)

                {

                    System.String messageEx = ex.Message;

                    warning(strFmt("There is an error%1",messageEx));                    

                }

            }

        

       

    }


}

No comments:

Post a Comment

Give me the commetns and solutions

How to add the Display method in the form level in D365 F&O

 The below examle is to add the form -Data source level adding display method and assigning to form design control.