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");}
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:
Post a Comment