Prevent Record Saving and Display Only Error Message

To prevent saving a record and display a specific error message in NetSuite, use the following approach in your SuiteScript:

let errorView = error.create({  

  name: ‘TITLE’,  

  message: ‘Error: write the error message.’,  

  notifyOff: true  

});  

throw errorView.message;  

Leave a comment

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