system.kanoa.cmms.deleteWorkOrderPriority(workOrderPriorityId, userId)
Deletes a work order priority from the system. The underlying SQL includes a referential-integrity guard: if the priority is still referenced by any existing work order, the delete will be prevented rather than silently orphaning records.
Parameters
workOrderPriorityId Integer: Id of the priority to delete
userId Integer:Id of the user executing the function
Returns
# of records modified Integer
msg String None if success
Example
# Attempt to delete the "Low" work order priority
workOrderPriorityId = 7
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
recordsModified, msg = system.kanoa.cmms.deleteWorkOrderPriority(workOrderPriorityId, userId)
print recordsModified, msg