Skip to main content

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.

Syntax

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

Parameters

ParameterTypeDescription
productionOrderIdOrNameStringThe ULID or name of the production order associated with the bill of materials.
materialIdOrPathStringThe 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
bill_of_materials = system.mes.productionOrder.getBillOfMaterialsFor('01JPMTA7K3-E8EHA4MD-7C304P4Z', '01JCH3ENGW-82KJDZDR-JHGYCXQN')

# Output the bill of materials
print(bill_of_materials)