if (status === ‘Billed’ && scriptContext.type === scriptContext.UserEventType.EDIT) {
log.debug(‘error’, ‘You cannot edit a Sales Order with status “Billed”.’);
throw (‘You cannot edit a Sales Order with status “Billed”.’);
}
if (status === ‘Billed’ && scriptContext.type === scriptContext.UserEventType.EDIT) {
log.debug(‘error’, ‘You cannot edit a Sales Order with status “Billed”.’);
throw (‘You cannot edit a Sales Order with status “Billed”.’);
}