Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Request Suitelet from User Event Script = UNEXPECTED ERROR
We have a suitelet that acts as a connector between NS and a 3rd party service. When triggered independently the suitelet runs fine.
Now we are trying to run the suitelet on an after submit trigger from a user event script. Every time we try to do this we get an UNEXPECTED ERROR and any effort to reveal further details fails.
Here is a snippet of code from the user event script:
var scriptURL = nlapiResolveURL('SUITELET', 'customscript_connector_sle', 1) + '&recordID=' + postID; nlapiLogExecution('debug', 'Script URL', scriptURL); try { var request = nlapiRequestURL(scriptURL); } catch(e) { if (e instanceof nlobjError) { nlapiLogExecution('error', 'Error requesting SLE', e.getCode() + ' - ' + e.getDetails()); return; } else { nlapiLogExecution('error', 'Unexpected Error', error.toString()); return; } } 0