system.kanoa.cmms.addWorkOrderEventStatus(statusInfo, userId)
Creates a new work order event status definition and returns the id of the newly created record. Call this when setting up a new status value that can be assigned to individual work order events during execution (for example, a technician check-in state distinct from the overall WorkOrderStatus of the work order).
All keys in statusInfo are required � there is no partial-create variant of this function.
Parameters
statusInfo Dictionary
| - enabled | Boolean | |
| - isActive | Boolean | |
| - reservedBySystem | Boolean | |
| - sortOrder | Boolean | |
| - workOrderEventStatusCategoryId | Integer | |
| - workOrderEventStatusColor | String | |
| - workOrderEventStatusName | String | Name of status |
userId Integer:Id of the user executing the function
Returns
workOrderEventStatusId Integer
message String None if success
Example
statusInfo = {
"enabled": True,
"isActive": True,
"reservedBySystem": False,
"sortOrder": 10,
"workOrderEventStatusCategoryId": 3,
"workOrderEventStatusColor": "#F4A300",
"workOrderEventStatusName": "Awaiting Parts"
}
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
workOrderEventStatusId, message = system.kanoa.cmms.addWorkOrderEventStatus(statusInfo, userId)
print workOrderEventStatusId, message