Skip to main content

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

- durationMinutesIntegerHow long the technician worked, in minutes
- userIdIntegerId of the technician who worked it (not the caller, see the trailing userId argument below)
- workOrderEventIdIntegerId of the work order event worked
- workOrderEventTechnicianIdIntegerId of the entry to update
- workTypeIdIntegerNot 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