system.kanoa.cmms.updateProcedureField(procedureId, field, value, userId)
Updates a single named field on an existing procedure record, identified by procedureId, without needing to supply the procedure's other fields.
Use this instead of updateProcedure when only one attribute needs to change � for example toggling enabled, renaming the procedure, or re-categorizing it.
The field parameter must be one of the supported column names (title, procedureName, procedureCategoryId, enabled), and value is passed as the new value for that field, with userId recorded for audit purposes.
Parameters
procedureId Integer: Id of procedureId to update
field String: Valid options are title, procedureName, procedureCategoryId, enabled
value String: Value to update to
userId Integer:Id of the user executing the function
Returns
# of records modified Integer
message String None if success
Example
procedureId = 22
field = "enabled"
value = False
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
result, message = system.kanoa.cmms.updateProcedureField(procedureId, field, value, userId)
print result, message