system.kanoa.lot.enableLotOperationAssetLink
Description
Updates the enabled state of a lot-operation-to-asset link record.Syntax
enableLotOperationAssetLink(lotOperationAssetLinkId, enabled)Parameters:
– lotOperationAssetLinkId (int): The ID of the link record to update.
– enabled (bool): The desired state of the link (True to enable, False to disable).
Returns:
– recordsModified (int): Number of records updated (typically 1).
Behavior
The function updates the enabled flag for the specified lotOperationAssetLinkId in the mes.lotOperationAssetLink table.– If the ID exists, the enabled column is set to the provided value.
– Returns the number of affected rows to confirm the update.
Parameters
Parameter | Type | Required | Notes |
---|---|---|---|
lotOperationAssetLinkId | int | Yes | ID of the lot-operation-to-asset link record to update |
enabled | bool | Yes | True to enable the link, False to disable it |
Code Examples
# Enable a link
recordsModified = system.kanoa.lot.enableLotOperationAssetLink(
lotOperationAssetLinkId=305,
enabled=True
)
print(recordsModified) # e.g., 1
# Disable a link
recordsModified = system.kanoa.lot.enableLotOperationAssetLink(
lotOperationAssetLinkId=305,
enabled=False
)
print(recordsModified)