Skip to main content

system.kanoa.asset.addMode(modeInfo, userId)

Adds a new mode. modeInfo keys are required.


Parameters

modeInfo Dictionary

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

userId Integer: Id of user executing the function


Returns

modeId Integer


Example

modeInfo = {
'modeName': 'NewMode',
'modeTypeId': 1,
'enabled': True,
'canSelect': True,
'canSchedule': False,
'modeColor': '#00FF00',
'iconPath': '/path/to/icon'
}
userId = 5
modeId = system.kanoa.asset.addMode(modeInfo, userId)