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; } }The execution log always comes back as:Error requesting SLE -> UNEXPECTED_ERROR - nullI've verified that the URL in the execution log is correct. Also, if I try and perform the nlapiResolveURL and nlapiRequestURL from the console they work perfectly.I've also tried adding every non-essential parameter as null in the nlapiRequestURL call. I've also tried explicitly making it a GET or a POST. No difference.Anybody know what may be going on here?