16 Sept 2014

Throw user define exception + ax 2012

 How to throw user define exception in AX.


EmpData  e;
 try
{
                    select  e where e.Name=="Suresh";
                    if(!e.Name)
                                         throw error("Invalid Name");
                    else
                                         info(e.Name);
 }
catch(Exception::error)
{
                    error("Exception occured");}

No comments:

Create number sequence in D365 FO

Create the data type. Add code in the loadModule method of the appropriate NumberSeqModule subclass. Add a method to the module’s paramet...