system.kanoa.cmms.updateWorkOrderEventTechnician(workOrderEventTechnicianInfo, userId)
Updates an existing work order event technician entry's full record (technician, work order event, work type, and duration).
All keys in workOrderEventTechnicianInfo are required, including fields that aren't changing.
Parameters
workOrderEventTechnicianInfo Dictionary
| - durationMinutes | Integer | How long the technician worked, in minutes |
| - userId | Integer | Id of the technician who worked it (not the caller, see the trailing userId argument below) |
| - workOrderEventId | Integer | Id of the work order event worked |
| - workOrderEventTechnicianId | Integer | Id of the entry to update |
| - workTypeId | Integer | Not required. The kind of work performed (Design, Repair, ...) |
userId Integer:Id of the user executing the function
Returns
# of records modified Integer
message String None if success
Example
# Correct the duration logged on technician entry 118 to 105 minutes
workOrderEventTechnicianInfo = {
"workOrderEventTechnicianId": 118,
"workOrderEventId": 4521,
"userId": 12,
"workTypeId": 2,
"durationMinutes": 105,
}
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
recordsModified, message = system.kanoa.cmms.updateWorkOrderEventTechnician(workOrderEventTechnicianInfo, userId)
print recordsModified, message