system.kanoa.cmms.deleteWorkOrderStatus(workOrderStatusId, userId)
Deletes a work order status code from the system by its id. Call this when removing an obsolete or unused status (e.g. one created in error) from the list of statuses a work order can be set to. The underlying SQL constraints prevent deletion of a status that is currently in use by one or more work orders, so this call will fail safely rather than orphaning records that reference it.
Parameters
workOrderStatusId Integer: Id of the status category to delete
userId Integer:Id of the user executing the function
Returns
# of records modified Integer
msg String None if success
Example
workOrderStatusId = 7
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
recordsModified, msg = system.kanoa.cmms.deleteWorkOrderStatus(workOrderStatusId, userId)
print recordsModified, msg