system.kanoa.item.addItemState(itemStateInfo, userId)
Adds a new item state. All itemStateInfo keys are required unless otherwise stated.
Parameters
itemStateInfo Dictionary
| - counterTypeId | Integer | |
| - enabled | Boolean | |
| - itemStateClassId | Integer | |
| - itemStateColor | String | Not required |
| - itemStateName | String |
userId Integer:Id of the user executing the function
Returns
itemStateId Integer
message String None if success
Example
userId = 1
itemStateInfo = {'itemStateName': 'Dis-coloration', 'itemStateClassId': None, 'itemStateColor': '#FF0000', 'counterTypeId': 2, 'enabled': True}
itemStateId, msg = system.kanoa.item.addItemState(itemStateInfo, userId)