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.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Please note that on Saturday, April 18, 2026, at 8:00 PM Pacific Time, our Case Management System will undergo a scheduled maintenance for approximately 15 minutes. During this time, case creation via SuiteAnswers will be unavailable and inbound calls will be routed to Customer Service.
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