# system.kanoa.asset.updateMode(modeInfo, userId)

This function updates the mode and also updates the enabled bit for any asset mode links in case the enabled mode has changed

---
### Parameters
**modeInfo** `Dictionary`<br />
<table class='dictionaryKeyTable'>
	<tbody>
 	<tr><td> - canSchedule</td><td>Boolean</td><td></td></tr>	
 	<tr><td> - canSelect</td><td>Boolean</td><td></td></tr>	
 	<tr><td> - enabled</td><td>Boolean</td><td></td></tr>	
 	<tr><td> - iconPath</td><td>String</td><td></td></tr>	
 	<tr><td> - modeColor</td><td>String</td><td>i.e '#FF0000'</td></tr>	
 	<tr><td> - modeId</td><td>Integer</td><td></td></tr>	
 	<tr><td> - modeName</td><td>String</td><td></td></tr>	
 	<tr><td> - modeTypeId</td><td>Integer</td><td></td></tr>	
	</tbody>
</table>

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

---
### Returns
**# of records modified** `Integer`<br />

---
### Example
```python
modeInfo = {
    'modeName': 'Changeover',
    'modeTypeId': 2,
    'enabled': True,
    'canSelect': True,
    'canSchedule': False,
    'modeColor': '#FF0000',
    'iconPath': '/path/to/icon.png',
    'modeId': 10
}
userId = 123
updatedModeId = system.kanoa.asset.updateMode(modeInfo, userId)
```
