system.kanoa.lot.addLotStateReason
Description
Adds a new lot state reason.Syntax
addLotStateReason(stateInfo, userId)- Dictionary stateInfo - Information about the lot state reason to be added, including lotStateReasonName, lotStateId, and enabled.
- int userId - User ID
- 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