system.kanoa.cmms.updateWorkOrderEventStatus(statusInfo, userId)
Updates an existing work order event status record, replacing its field values with the contents of statusInfo.
Call this when changing multiple attributes of a status at once (name, color, category, enabled/active flags, or sort order) rather than a single field.
All keys in statusInfo are required � there is no partial-update variant; use updateWorkOrderEventStatusField to change a single column instead.
Parameters
statusInfo Dictionary
| - enabled | Boolean | |
| - isActive | Boolean | |
| - reservedBySystem | Boolean | |
| - sortOrder | Boolean | |
| - workOrderEventStatusCategoryId | Integer | |
| - workOrderEventStatusColor | String | |
| - workOrderEventStatusId | String | Id of status |
| - workOrderEventStatusName | String | Name of status |
userId Integer:Id of the user executing the function
Returns
# of records modified Integer
message String None if success
Example
statusInfo = {
"enabled": True,
"isActive": True,
"reservedBySystem": False,
"sortOrder": 20,
"workOrderEventStatusCategoryId": 3,
"workOrderEventStatusColor": "#2E8B57",
"workOrderEventStatusId": "17",
"workOrderEventStatusName": "Parts Received"
}
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
recordsModified, message = system.kanoa.cmms.updateWorkOrderEventStatus(statusInfo, userId)
print recordsModified, message