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)- int lotStateReasonAssetLinkId - Lot state reason asset link ID
- int userId - User ID
- int - Number of records modified
- string - Message indicating whether the link was deleted or disabled
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