Modules
Objects/Functions
SuiteScript 2.0
// Please search https://system.netsuite.com/app/help/helpcenter.nl?search=error.UserEventError for more information.
N/error Module
error.UserEventError
Object Description:
Encapsulates a custom SuiteScript error for a user event script.
Use this object in a try-catch statement to abort script execution.
Create a new custom error with the error.create(options) method. The error.create(options) method returns error.UserEventError when it is called in a user event script.
When error.create(options) is called in a server script that is not a user event script, it returns error.SuiteScriptError.
For a complete list of this object’s methods and properties, see UserEventError Object Members.
Supported Script Types:
User event scripts
For more information, see SuiteScript 2.0 User Event Script Type.
Module:
N/error Module
Since:
2015.2
Search NetSuite -
https://system.netsuite.com/app/help/helpcenter.nl?search=error.UserEventError
Example:
// Code Example 1
//Add additional code
//...
// Include this code in a user event script to create an error.UserEventError object
var UEcustom_error = error.create({
name: 'MY_ERROR_CODE',
message: 'my custom UserEventError details',
notifyOff: false
});
//...
//Add additional code
//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4253440386.html