system.kanoa.asset.addMode(modeInfo, userId)
Adds a new mode. modeInfo keys are required.
Parameters
modeInfo Dictionary
| - canSchedule | Boolean | |
| - canSelect | Boolean | |
| - enabled | Boolean | |
| - iconPath | String | |
| - modeColor | String | i.e '#FF0000' |
| - modeName | String | |
| - modeTypeId | Integer |
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)