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!
When is nlobjError actually used??
From the help:
nlapiCreateError(code, details, suppressNotification)
Creates an nlobjError (complete with stacktrace) that can be thrown to abort script execution.
This code:
function SS_OnBeforeLoad(type) { // Test nlobjError and the stacktrace property try { a(); } catch(e) { var msg = new String(); if(e instanceof nlobjError) { msg += 'nlobjError Exceptionn'; msg += 'Code: ' + e.getCode() + 'n'; msg += 'Details: ' + e.getDetails() + 'n'; msg += 'UserEvent: ' + e.getUserEvent() + 'n'; msg += 'InternalId: ' + e.getInternalId() + 'n'; var stacktrace = e.getStackTrace(); for ( var i = 0; stacktrace != null && i < stacktrace.length; i++ ) { if ( i == 0 ) { msg += 'Stack Trace' + 'n'; } msg += stacktrace[i] + Steve Klett | Senior Developer
NetValue Technology
0