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
| - canSchedule | Boolean | |
| - canSelect | Boolean | |
| - enabled | Boolean | |
| - iconPath | String | |
| - modeColor | String | i.e '#FF0000' |
| - modeId | Integer | |
| - modeName | String | |
| - modeTypeId | Integer |
userId Integer: Id of user executing the function
Returns
# of records modified Integer
Example
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)