Skip to main content

system.kanoa.lot.addLotStateReason

This function is part of the kanoaOPS module

Description

Adds a new lot state reason.

Syntax

addLotStateReason(stateInfo, userId)
  • Parameters
      Dictionary stateInfo - Information about the lot state reason to be added, including lotStateReasonName, lotStateId, and enabled.
      int userId - User ID
  • Returns
      int - State ID
  • Code Examples

    # Example usage
    stateInfo = {'lotStateReasonName': 'my state reason', 'lotStateId': 1, 'enabled': True}
    userId = 123
    stateId = system.kanoa.lot.addLotStateReason(stateInfo, userId)
    print(stateId) # Print the added state ID