system.kanoa.cmms.deleteWorkOrder(workOrderId, userId)
Deletes the work order identified by workOrderId, recording userId for the audit trail.
Call this when a work order was created in error or is no longer needed and should be permanently removed rather than closed out through a status change.
Returns the number of records affected so callers can confirm whether the delete actually removed a row.
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
# Remove a duplicate work order accidentally created for Chiller-3
workOrderId = 6098
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
recordsModified, msg = system.kanoa.cmms.deleteWorkOrder(workOrderId, userId)
print recordsModified, msg