system.mes.inventory.doesLotExist
Description
Checks if an Inventory Lot with the given material and lot name exists in the system.
Syntax
system.mes.inventory.doesLotExist(materialIdOrPath, lotName)
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
materialIdOrPath | String | False | The ID or path of the material associated with the inventory lot. |
lotName | String | False | The name of the inventory lot to search for. |
Returns
Returns True if an inventory lot with the given material and name exists, False otherwise.
Code Examples
# Check if a lot with the given material and name exists
exists = system.mes.inventory.doesLotExist('Bottle/Milk', 'L2824L9CO')
if exists:
print('Lot exists')
else:
print('Lot does not exist')