If we want to prevent users from saving a record under certain conditions, use a BeforeSubmit User Event Script. Example: Prevent Invoices with Negative Amounts from Being Saved define([‘N/record’, ‘N/error’], function(record, error) { function beforeSubmit(scriptContext) { let newRecord = scriptContext.newRecord; let amount = newRecord.getValue(‘total’); … Continue reading Real-Time Validation Before Saving a Record (User Event Script – BeforeSubmit)