Skip to main content

system.kanoa.cmms.deleteProcedureStep(procedureStepId, userId)

Deletes a single step from a procedure by id. Call this when a step was added in error or is no longer part of the correct procedure workflow. The underlying SQL will prevent deletion if the procedure step has already been used � for example, if procedure step events or checks reference it � so the deletion fails safely rather than leaving orphaned execution history.


Parameters

procedureStepId Integer: Id of the procedure step to delete
userId Integer:Id of the user executing the function


Returns

# of records modified Integer
msg String None if success


Example

procedureStepId = 4501
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})

result, message = system.kanoa.cmms.deleteProcedureStep(procedureStepId, userId)
print result, message