Discussions
Get Error Message on nlapiSubmitRecord failure
Hi ,
Is there a way to get the error message if nlapiSubmitRecord is a failure?
I tried the following code but I am getting the "e.message" on the email as undefined.
Any ideas???
try
{
nlapiSubmitRecord(record, false);
}
catch (e)
{
var emailMsg = "Unable to update Customer record ";
emailMsg = emailMsg + "\nError :"+e.message ;
emailMsg = emailMsg + "\nCustomer InternalId :"+custInternalID ;
emailMsg = emailMsg + "\nCustomer Name :"+custName ;
nlapiSendEmail(-5, '35565', 'Unable to update Customer on Invoice Save', emailMsg, null, null, null);
}
Thanks,
Iby