# system.kanoa.cmms.updateWorkOrderStatus(statusInfo, userId)

Updates an existing work order status code identified by `workOrderStatusId`. 
Call this when renaming a status, re-ordering it in a status list, or toggling whether it is enabled � for example changing "In Progress" to "In Progress - Awaiting Parts". 
All keys in `statusInfo` are required, so this is a full-record update rather than a partial patch; use `updateWorkOrderStatusField` instead if only a single field needs to change.

---
### Parameters
**statusInfo** `Dictionary`<br />
<table class='dictionaryKeyTable'>
	<tbody>
 	<tr><td> - enabled</td><td>Boolean</td><td></td></tr>	
 	<tr><td> - sortOrder</td><td>Integer</td><td></td></tr>	
 	<tr><td> - workOrderStatusId</td><td>Integer</td><td>Id of status</td></tr>	
 	<tr><td> - workOrderStatusName</td><td>String</td><td>Name of status</td></tr>	
	</tbody>
</table>

**userId** `Integer`:Id of the user executing the function<br />

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

---
### Example
```python
statusInfo = {
	"enabled": True,
	"sortOrder": 2,
	"workOrderStatusId": 3,
	"workOrderStatusName": "In Progress"
}
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
recordsModified, message = system.kanoa.cmms.updateWorkOrderStatus(statusInfo, userId)
print recordsModified, message
```
