system.kanoa.asset.updateState(stateInfo, userId)
Update the state info for a given stateId. All stateInfo keys are required. Updates stateAssetLink table accordingly
Parameters
stateInfo Dictionary
| - assetGroupId | Integer | |
| - enabled | Boolean | |
| - stateCategoryId | Integer | |
| - stateColor | String | i.e. '#FF0000' |
| - stateId | Integer | |
| - stateName | String | |
| - stateTypeId | Integer |
userId Integer: Id of user executing the function
Returns
# of records modified Integer
Example
stateInfo = {
'stateId': 123,
'stateName': 'Blocked',
'stateCategoryId': 2,
'stateTypeId': 2,
'assetGroupId': 2,
'enabled': False
}
userId = 456
recordsModified = system.kanoa.asset.updateState(stateInfo, userId)