system.kanoa.cmms.addWorkOrderEventStatusCategory(statusCategoryInfo, userId)
Creates a new work order event status category record. Status categories are a grouping/classification layer above individual work-order-event statuses �
for example, categorizing statuses like "Open" or "Assigned" under a broader category such as "Active", versus "Closed" or "Cancelled" under "Complete".
All keys in statusCategoryInfo are required; the call will fail if any key is omitted.
On success, the newly created status category's id is returned along with a None message.
Parameters
statusCategoryInfo Dictionary
| - enabled | Boolean | |
| - isActive | Boolean | |
| - workOrderEventStatusCategoryName | String | Name of status category |
userId Integer:Id of the user executing the function
Returns
workOrderStatusCategoryId Integer
message String None if success
Example
statusCategoryInfo = {
"workOrderEventStatusCategoryName": "Active",
"enabled": True,
"isActive": True,
}
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
workOrderStatusCategoryId, message = system.kanoa.cmms.addWorkOrderEventStatusCategory(statusCategoryInfo, userId)
print workOrderStatusCategoryId, message