system.kanoa.lot.unlinkAssetLotState
Description
Checks if a lot state reason has been stored in the stateEvent table and disables it if found; otherwise, deletes it.Syntax
unlinkAssetLotState(lotStateReasonAssetLinkId, userId)Parameters:
Returns:
Code Examples
# Example usage
lotStateReasonAssetLinkId = 1
userId = 123
recordsModified, msg = system.kanoa.lot.unlinkAssetLotState(lotStateReasonAssetLinkId, userId)
print(recordsModified) # Print the number of records modified
print(msg) # Print the message indicating whether the link was deleted or disabled