system.kanoa.cmms.deleteWorkOrderCondition(workOrderId, userId)
Deletes a condition-based trigger from a work order, permanently removing the association between the specified work order and the condition (e.g. a sensor threshold or counter rule) that would otherwise auto-generate future work orders.
This does not delete the work order itself, only the condition record tied to it.
Use getWorkOrderConditions first to look up the workOrderId for the condition you intend to remove.
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 = 4521
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
recordsModified, msg = system.kanoa.cmms.deleteWorkOrderCondition(workOrderId, userId)
print recordsModified, msg