# system.kanoa.order.updateProductionOrderState(orderStateInfo, userId)

Update a production order state. States that are reservedBySystem cannot be updated

---
### Parameters
**orderStateInfo** `Dictionary`: Keys are required unless otherwise stated<br />
<table class='dictionaryKeyTable'>
	<tbody>
 	<tr><td> - canExecute</td><td>Boolean</td><td>Not required. Is set to False if not provided</td></tr>	
 	<tr><td> - canSchedule</td><td>Boolean</td><td>Not required. Is set to False if not provided</td></tr>	
 	<tr><td> - enabled</td><td>Boolean</td><td>Not required. Is set to True if not provided</td></tr>	
 	<tr><td> - isActive</td><td>Boolean</td><td>Not required. Is set to False if not provided</td></tr>	
 	<tr><td> - statusColor</td><td>String</td><td>i.e. '#FFFF00': Not required. Is set to None if not provided</td></tr>	
 	<tr><td> - workOrderStatusId</td><td>Integer</td><td>Id of the workorder status to update</td></tr>	
 	<tr><td> - workOrderStatusName</td><td>String</td><td></td></tr>	
	</tbody>
</table>

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

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

---
### Example
```python
orderStateInfo = {'workOrderStatusId': 34, 'workOrderStatusName': 'Released', 'statusColor': '#FFFFFF', 'enabled': True, 'isActive': True, 'canSchedule': True, 'canExecute': True}
userId = 5
retVal, msg = system.kanoa.order.updateProductionOrderState(orderStateInfo, userId)
```
