Skip to main content

system.kanoa.lot.enableLotOperationItemLink

Requires kanoaOPS license

Description

Updates the enabled state of a lot-operation-to-item link record.

Syntax

enableLotOperationItemLink(lotOperationItemLinkId, enabled)

Parameters:

– lotOperationItemLinkId (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 lotOperationItemLinkId in the mes.lotOperationItemLink 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

ParameterTypeRequiredNotes
lotOperationItemLinkIdintYesID of the lot-operation-to-item link record to update
enabledboolYesTrue to enable the link, False to disable it

Code Examples

# Enable a link
recordsModified = system.kanoa.lot.enableLotOperationItemLink(
lotOperationItemLinkId=8801,
enabled=True
)
print(recordsModified) # e.g., 1

# Disable a link
recordsModified = system.kanoa.lot.enableLotOperationItemLink(
lotOperationItemLinkId=8801,
enabled=False
)
print(recordsModified)