system.kanoa.asset.updateMode
Description
Updates the mode and also updates the enabled bit for any asset mode links in case the enabled mode has changed.Syntax
updateMode(modeInfo, userId)Parameters:
Returns:
Dictionary
| Parameter | Type | Required | Notes | 
|---|---|---|---|
| modeName | str | Name of the mode. | |
| modeTypeId | int | ID of the mode type. | |
| enabled | bool | Enabled status of the mode. | |
| canSelect | bool | Whether mode can be selected. | |
| canSchedule | bool | Whether mode can be scheduled. | |
| modeColor | str | Color code for the mode. | |
| iconPath | str | Path to the mode's icon. | |
| modeId | int | ID of the mode to be updated. | 
Code Examples
# Example Usage:
modeInfo = {
    'modeName': 'Updated Mode',
    '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)