system.kanoa.asset.addState(stateInfo, userId)
Adds a new state. All stateInfo keys are required
Parameters
stateInfo Dictionary
| - assetGroupId | Integer | |
| - enabled | Boolean | |
| - stateCategoryId | Integer | |
| - stateColor | String | i.e. '#FF0000' |
| - stateName | String | |
| - stateTypeId | Integer |
userId Integer: Id of user executing the function
Returns
stateId Integer
Example
stateInfo = {
'stateName': 'Blocked',
'stateColor': #00FF00',
'stateCategoryId': 1,
'stateTypeId': 1,
'assetGroupId': 1,
'enabled': True
}
userId = 456
stateId = system.kanoa.asset.addState(stateInfo, userId)