# system.kanoa.item.updateItemState(itemStateInfo, userId)

Update the item state. All itemStateInfo keys are required unless otherwise stated

---
### Parameters
**itemStateInfo** `Dictionary`<br />
<table class='dictionaryKeyTable'>
	<tbody>
 	<tr><td> - counterTypeId</td><td>Integer</td><td></td></tr>	
 	<tr><td> - enabled</td><td>Boolean</td><td></td></tr>	
 	<tr><td> - itemStateClassId</td><td>Integer</td><td></td></tr>	
 	<tr><td> - itemStateColor</td><td>String</td><td>Not required</td></tr>	
 	<tr><td> - itemStateId</td><td>Integer</td><td></td></tr>	
 	<tr><td> - itemStateName</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 />
**message** `String` None if success<br />

---
### Example
```python
userId = 1
itemStateInfo = {'itemStateId': 1, 'itemStateName': 'Dis-coloration', 'itemStateClassId': None, 'itemStateColor': '#FF00FF', 'counterTypeId': 2, 'enabled': True}
retVal, msg = system.kanoa.item.updateItemState(itemStateInfo, userId)
```
