Skip to main content

system.mes.material.getMaterialReferences

Description

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

Syntax

system.mes.material.getMaterialReferences(idOrPath)

Parameters

ParameterTypeDescription
idOrPathStringThe ID or path of the material 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 material.

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 material.

Code Examples

# Retrieve the references for the material specified
material_references = system.mes.material.getMaterialReferences('IRB/5391537510212')

# Output the material references
print(material_references)