Skip to main content

system.kanoa.cmms.updateWorkOrderEventStatusCategory(statusCategoryInfo, userId)

Updates an existing work order event status category identified by workOrderEventStatusCategoryId. Status categories group individual work-order-event statuses under a broader classification (e.g. "Active" vs "Complete"). All keys in statusCategoryInfo are required, including the id of the category being updated; the call will fail if any key is omitted.


Parameters

statusCategoryInfo Dictionary

- enabledBoolean
- isActiveBoolean
- workOrderEventStatusCategoryIdInteger
- workOrderEventStatusCategoryNameString

userId Integer:Id of the user executing the function


Returns

# of records modified Boolean
msg String records modified or error message


Example

statusCategoryInfo = {
"workOrderEventStatusCategoryId": 7,
"workOrderEventStatusCategoryName": "Active",
"enabled": True,
"isActive": True,
}
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})

recordsModified, msg = system.kanoa.cmms.updateWorkOrderEventStatusCategory(statusCategoryInfo, userId)
print recordsModified, msg