system.mes.inventory.getInventoryLotRecordsByLocationPathPrefixAndDateRange
Description
Retrieves all Inventory Lot Records for the specified location path prefix and date range.
Syntax
system.mes.inventory.getInventoryLotRecordsByLocationPathPrefixAndDateRange(locationPath, startDateMillis, endDateMillis, onlyShowRecordsForInventoryOperations)
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
locationPath | String | True | The path prefix of the location to retrieve lot records for. If null, retrieves records for all locations. |
startDateMillis | Long | True | The start date of the date range in milliseconds since epoch. |
endDateMillis | Long | True | The end date of the date range in milliseconds since epoch. |
onlyShowRecordsForInventoryOperations | Boolean | True | If true, only returns records associated with inventory operations. |
Returns
Returns a list of JSON objects representing inventory lot records matching the specified criteria.
Code Examples
# Get all lot records for a location path prefix within a date range
records = system.mes.inventory.getInventoryLotRecordsByLocationPathPrefixAndDateRange(
'DairyCo/Plant1',
1700000000000,
1710000000000,
False
)
# Output the list of lot records
for record in records:
print(record)