system.mes.equipment.getEquipmentReferences
Description
Retrieves a list of references to an Equipment record by its ID or path.
Permissions
This method requires the EQUIPMENT.READ.GET permission.
Syntax
system.mes.equipment.getEquipmentReferences(idOrPath)
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
idOrPath | String | False | The ID or path of the equipment. |
Returns
Returns a list of JSON objects. Each JSON object has the following properties:
| Name | Type | Description |
|---|---|---|
tableName | String | The name of the table that the reference is in. |
references | List<JSON Object> | List of JSON objects corresponding to references to the equipment. |
The JSON Objects in references has the following properties:
| Name | Type | Description |
|---|---|---|
fkColName | String | The name of the foreign key column. |
id | String (ULID) | The ULID of the object referencing the equipment. |
Code Examples
references = system.mes.equipment.getEquipmentReferences('Pumps/CentrifugalPumps/Pump-101')
print(references)