Skip to main content

system.kanoa.lot.deleteLotStateReason

Description

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

Syntax

deleteLotStateReason(lotStateReasonId, userId)

Parameters:
  • lotStateReasonId (int)
  • userId (int)

  • Returns:
  • Number of records modified (int)
  • message (string): Message indicating whether the reason was deleted or disabled
  • Code Examples

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