Skip to main content

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

- canScheduleBoolean
- canSelectBoolean
- enabledBoolean
- iconPathString
- modeColorStringi.e '#FF0000'
- modeIdInteger
- modeNameString
- modeTypeIdInteger

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)