Skip to main content

system.kanoa.cmms.deleteWorkOrderSchedule(workOrderId, userId)

Deletes the recurring schedule attached to a work order, identified by workOrderId. Once deleted, the work order will no longer automatically generate future schedule events (see getWorkOrderSchedule / addWorkOrderScheduleEvent). This does not delete the work order itself, only its schedule definition.


Parameters

workOrderId Integer: Id of work order to delete
userId Integer:Id of the user executing the function


Returns

# of records modified Integer
msg String None if success


Example

workOrderId = 4821
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
recordsModified, msg = system.kanoa.cmms.deleteWorkOrderSchedule(workOrderId, userId)
print recordsModified, msg