suitescript••8 min read
Fixing RCRD_HAS_BEEN_CHANGED on NetSuite Work Orders
Learn the causes and solutions for RCRD_HAS_BEEN_CHANGED errors when updating Work Orders.
By Ashoka Sanjapu
## Why RCRD_HAS_BEEN_CHANGED Happens
NetSuite throws the `RCRD_HAS_BEEN_CHANGED` error when a record changes between the time it is loaded and saved.
## Common Causes
- Multiple scripts updating the same Work Order
- A workflow running during the save
- Two Map/Reduce executions processing the same record
- A user editing the Work Order while a script is running
## Example
```javascript
const workOrder = record.load({
type: record.Type.WORK_ORDER,
id: workOrderId,
});
workOrder.setValue({
fieldId: "memo",
value: "Updated by script",
});
workOrder.save();
```
## Best Practice
Use `record.submitFields()` when you only need to update body fields.
```javascript
record.submitFields({
type: record.Type.WORK_ORDER,
id: workOrderId,
values: {
memo: "Updated safely",
},
});
```