system.kanoa.lot.updateRouteStepField
Description
Updates a single field on an existing route step record.Syntax
updateRouteStepField(routeStepId, field, value, userId)Parameters:
– routeStepId (int): ID of the route step to update.
– field (string): Column name to update.
– value (pyObject): New value for the column.
– userId (int): User ID performing the update.
Returns:
– recordsModified (int): Number of records updated.
– message (string or None): None if success; error details on failure.
Behavior
Performs a targeted update on mes.routeStep:– Sets the specified column to the provided value for the given routeStepId.
– Automatically updates changedBy and changedDate.
– Emits a debug line via system.perspective.print showing the field/value/ID being set.
Parameters
Parameter | Type | Required | Notes |
---|---|---|---|
routeStepId | int | Yes | Identifier of the route step to update |
field | string | Yes | Name of the column to modify |
value | pyObject | Yes | New value to assign; type should match the column |
userId | int | Yes | User performing the update |
Code Examples
# Change the step number
recordsModified, msg = system.kanoa.lot.updateRouteStepField(
routeStepId=5001,
field="stepNum",
value=4,
userId=123
)
print(recordsModified, msg)
# Disable a route step
recordsModified, msg = system.kanoa.lot.updateRouteStepField(
routeStepId=5002,
field="enabled",
value=False,
userId=123
)
print(recordsModified, msg)
# Update the step description
recordsModified, msg = system.kanoa.lot.updateRouteStepField(
routeStepId=5003,
field="stepDescription",
value="Final inspection before packaging",
userId=123
)
print(recordsModified, msg)