Skip to main content

system.mes.productionOrder.getBillOfMaterialsItem

Description

Retrieves a Production Order Bill of Materials record by its ID.

Syntax

system.mes.productionOrder.getBillOfMaterialsItem(id)

Parameters

ParameterTypeDescription
idString (ULID)The ID of the bill of materials to retrieve.

Returns

Returns a JSON representation of the bill of materials. Returns nothing if no bill of materials is found.

NameTypeDescription
productIdString (ULID)The ULID for the material produce to be produced.
productionOrderIdString (ULID)The ULID for the production order associated with this bill of materials.
materialNameStringThe name of the material that is a component of the produce.
materialIdString (ULID)The ULID of the material that is a component of the produce.
quantityPerProducedUnitDoubleThe quantity of the material used per unit produced of the product.
quantityOrderDoubleThe quantity of the material used per order.
unitOfMeasureIdString (ULID)The ULID of the unit of measure for this bill of materials.
unitOfMeasureNameStringThe name of the unit of measure for this bill of materials.
positionIntegerThe position of this bill of materials for the product.
materialGroupStringThe material group of the material associated with this bill of materials.
materialTypeStringThe material type of the material associated with this bill of materials.
idString (ULID)The ULID of the bill of materials.
notesStringNotes related to the bill of materials.
enabledBooleanIndicates if the bill of materials is active and enabled.
spare1StringAdditional field for user-defined context.
spare2StringAdditional field for user-defined context.
spare3StringAdditional field for user-defined context.

Code Examples

# Retrieve a bill of materials by ID
bill_of_materials = system.mes.productionOrder.getBillOfMaterialsItem('01JQ31CZMB-E7QA782B-5B521H4M')

# Output the bill of materials
print(bill_of_materials)