Skip to main content
Version: V2 (Ignition 8.1)

system.mes.productionOrder.getBillOfMaterialsFor

Description​

Retrieves the Production Order Bill of Materials record associated with a production order ID or name and a material ID or path.

Permissions​

This method requires the PRODUCTION_ORDER.READ.GET permission.

Syntax​

system.mes.productionOrder.getBillOfMaterialsFor(productionOrderIdOrName, materialIdOrPath)

Parameters​

ParameterTypeNullableDescription
productionOrderIdOrNameStringFalseThe ULID or name of the production order associated with the bill of materials.
materialIdOrPathStringFalseThe ULID or path of the material associated with the bill of materials.

Returns​

Returns a JSON representation of the bill of materials associated with the given production order and material.

Code Examples​

# Retrieves the bill of materials for a given production order ID or name and material ID or path
billOfMaterials = system.mes.productionOrder.getBillOfMaterialsFor('01JPMTA7K3-E8EHA4MD-7C304P4Z', '01JCH3ENGW-82KJDZDR-JHGYCXQN')

# Output the bill of materials
print(billOfMaterials)