system.mes.inventory.findLotIdsByLocationDateRangeAndMaterial
Description
Finds Inventory Lot IDs matching the specified location, material, and date range criteria.
Syntax
system.mes.inventory.findLotIdsByLocationDateRangeAndMaterial(locationIdOrPath, materialIdOrPath, startDate, endDate)
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
locationIdOrPath | String | True | The ID or path of the location to filter by. |
materialIdOrPath | String | True | The ID or path of the material to filter by. |
startDate | Date | True | The start date of the date range. Only lots active after this date are included. |
endDate | Date | True | The end date of the date range. Only lots active before this date are included. |
Returns
Returns an array of lot ID strings matching the specified criteria.
Code Examples
from java.util import Date
# Find lot IDs for a specific location and material within a date range
lotIds = system.mes.inventory.findLotIdsByLocationDateRangeAndMaterial(
locationIdOrPath='DairyCo/Plant1',
materialIdOrPath='Bottle/Milk',
startDate=None,
endDate=None
)
# Output the list of lot IDs
for lotId in lotIds:
print(lotId)