Skip to main content

system.kanoa.lot.deleteLotStateReason

This function is part of the kanoaOPS module

Description

Deletes a lot state reason. If the state has been used, sets the 'enabled' property to False.

Syntax

deleteLotStateReason(lotStateReasonId, userId)
  • Parameters
      int lotStateReasonId - Lot state reason ID
      int userId - User ID
  • Returns
      int - Number of records modified
      string - Message indicating whether the reason was deleted or disabled
  • Code Examples

    # Example usage
    lotStateReasonId = 1
    userId = 123
    recordsModified, msg = system.kanoa.lot.deleteLotStateReason(lotStateReasonId, userId)
    print(recordsModified) # Print the number of records modified
    print(msg) # Print the message indicating whether the reason was deleted or disabled