system.kanoa.cmms.updateProcedureStep(procedureStepInfo, userId)
Updates an existing procedure step definition, such as a step's name, description, sort order, or estimated duration.
Call this when editing a maintenance procedure template in the procedure builder UI � for example, after a technician or planner reorders steps, adjusts the estimated time, or toggles whether a step is required or enabled.
All keys in procedureStepInfo are required; the function overwrites the identified step's fields with the values supplied and records userId against the change for audit purposes.
Parameters
procedureStepInfo Dictionary
| - enabled | Boolean | |
| - estimatedMinutes | Integer | |
| - procedureId | Integer | Id of procedure |
| - procedureStepId | Integer | Id of procedure step |
| - required | Boolean | |
| - sortOrder | Integer | |
| - stepConfig | String | |
| - stepDescription | String | |
| - stepName | String |
userId Integer:Id of the user executing the function
Returns
# of records modified Integer
message String None if success
Example
procedureStepInfo = {
"procedureStepId": 4021,
"procedureId": 310,
"stepName": "Inspect belt tension",
"stepDescription": "Check drive belt deflection against spec and adjust tensioner if outside tolerance.",
"stepConfig": "",
"sortOrder": 3,
"estimatedMinutes": 15,
"required": True,
"enabled": True
}
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
result, message = system.kanoa.cmms.updateProcedureStep(procedureStepInfo, userId)
print result, message