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 the user executing the function


Returns

# of records modified Integer
message String None if success


Example

stateInfo = {
'stateId': 123,
'stateName': 'Blocked',
'stateCategoryId': 2,
'stateTypeId': 2,
'assetGroupId': 2,
'enabled': False
}
userId = 456
retVal, msg = system.kanoa.asset.updateState(stateInfo, userId)