Skip to main content

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

- assetGroupIdInteger
- enabledBoolean
- stateCategoryIdInteger
- stateColorStringi.e. '#FF0000'
- stateIdInteger
- stateNameString
- stateTypeIdInteger

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)