Skip to main content

system.mes.material.getMaterialClassReferences

Description

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

Syntax

system.mes.material.getMaterialClassReferences(idOrPath)

Parameters

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

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

Code Examples

# Retrieve the references for the material class specified
material_class_references = system.mes.material.getMaterialClassReferences('RAW')

# Output the material class references
print(material_class_references)