What is the process for throwing an error message in a User Event script 1.0 in NetSuite?

Scenario: A client has requested the addition of a notification feature to an existing User Event script 1.0.

>>To throw an error message in a User Event script1.0 in NetSuite, you can use the “nlapiCreateError” function to create a new error object with a specified error code and message.

var errorMsg = 'Transfer price of item is 0.';
    var error = nlapiCreateError('INVALID_ENTITY', errorMsg);
    throw error;

>>The error object, which is thrown using the ‘throw’ keyword, will stop the record submission and display the error message to the user.”

Leave a comment

Your email address will not be published. Required fields are marked *