system.kanoa.lot.addLotEvent
Description
Adds a new lot event.Syntax
addLotEvent(lotEventInfo, userId)- Dictionary lotEventInfo - Information about the lot event, including lotId, lotEventQty, itemUnitId, assetId, itemSourceId, lotStateId, lotStateReasonId, workOrderId, shiftId, tStamp, and comment.
- int userId - User ID
- int - Lot event ID
Code Examples
# Example usage
lotEventInfo = {'lotId': 1, 'lotEventQty': 100, 'itemUnitId': 2, 'workOrderId': 56, 'assetId': 1, 'itemSourceId': 2, 'lotStateId': 7, 'lotStateReasonId': 78, 'shiftId': 4, 'tStamp': somedate, 'comment': None}
userId = 123
lotEventId = system.kanoa.lot.addLotEvent(lotEventInfo, userId)
print(lotEventId) # Print the added lot event ID