system.kanoa.lot.deleteRouteStep(routeStepId, userId)
Delete a route Step.
The function deletes a route step from the mes.routeStep table.
– Logs the deletion attempt for audit tracking.
– Validates that a valid routeStepId is provided before attempting deletion.
– Executes a parameterized SQL DELETE statement to remove the record.
– Returns the number of affected rows and None if successful.
– Returns an error message if the route step cannot be deleted or if the ID is invalid.
– Logs the deletion attempt for audit tracking.
– Validates that a valid routeStepId is provided before attempting deletion.
– Executes a parameterized SQL DELETE statement to remove the record.
– Returns the number of affected rows and None if successful.
– Returns an error message if the route step cannot be deleted or if the ID is invalid.
Parameters
routeStepId Integer
userId Integer
Returns
# of records modified Integer
message String None if success
Example
# Delete a specific route step
recordsModified, msg = system.kanoa.lot.deleteRouteStep(5001, 123)