How can we show custom erro message in infopath 2007 with browser based forms....
as we have in 2003 infopath like below
try{
if(XDocument.Errors.length!=0) // analyse are there some errors in the form
{ //show the message of the first error in the form
XDocument.UI.Alert(XDocument.Errors.Item(0).DetailedErrorMessage);
}
else
{ //submit the form to a database
XDocument.Submit();
}
}
catch(ex)
{
XDocument.UI.Alert(ex.message);
}