Skip to main content

system.mes.location.getLocationReferences

Description

Retrieves a list of references to a Locations record by its ID or path.

Syntax

system.mes.location.getLocationReferences(idOrPath)

Parameters

ParameterTypeDescription
idOrPathStringThe ID or path of the location to retrieve.

Returns

Returns a list of JSON objects. Each JSON object has the following properties:

NameTypeDescription
tableNameStringThe name of the table that the reference is in.
referencesList<JSON Object>List of JSON objects corresponding to references to the location.

The JSON Objects in references has the following properties:

NameTypeDescription
fkColNameStringThe name of the foreign key column.
idString (ULID)The ULID of the object that is referencing the location.

Code Examples

# Retrieve the references for the location specified
location_references = system.mes.location.getLocationReferences('DairyCo')

# Output the location references
print(location_references)