Skip to main content

system.kanoa.lot.unlinkAssetLotState

This function is part of the kanoaOPS module

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
      int lotStateReasonAssetLinkId - Lot state reason asset link ID
      int userId - User ID
  • Returns
      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