Skip to main content

system.kanoa.item.updateItemState(itemStateInfo, userId)

Update the item state. All itemStateInfo keys are required unless otherwise stated


Parameters

itemStateInfo Dictionary

- counterTypeIdInteger
- enabledBoolean
- itemStateClassIdInteger
- itemStateColorStringNot required
- itemStateIdInteger
- itemStateNameString

userId Integer:Id of the user executing the function


Returns

# of records modified Integer
message String None if success


Example

userId = 1
itemStateInfo = {'itemStateId': 1, 'itemStateName': 'Dis-coloration', 'itemStateClassId': None, 'itemStateColor': '#FF00FF', 'counterTypeId': 2, 'enabled': True}
retVal, msg = system.kanoa.item.updateItemState(itemStateInfo, userId)