Skip to main content

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

ParameterTypeNullableDescription
locationPathStringTrueThe path prefix of the location to retrieve lot records for. If null, retrieves records for all locations.
startDateMillisLongTrueThe start date of the date range in milliseconds since epoch.
endDateMillisLongTrueThe end date of the date range in milliseconds since epoch.
onlyShowRecordsForInventoryOperationsBooleanTrueIf 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)