# system.kanoa.order.updateProductionOrderStateField(workOrderStatusId, field, value, userId)

Updates the passed field value for the given workOrderStatusId. States that are reserved by system can only have their color changed.

---
### Parameters
**workOrderStatusId** `Integer`: Id of the order state to update<br />
**field** `String`: Valid options are workOrderStatusName, statusColor, enabled, isActive, canSchedule, canExecute<br />
**value** `pyObject`: Value to update to<br />
**userId** `Integer`:Id of the user executing the function<br />

---
### Returns
**# of records modified** `Integer`<br />
**msg** `String` None if successful<br />

---
### Example
```python
userId = 5
retVal = system.kanoa.order.updateProductionOrderStateField(15, 'enabled', True, userId)
```
