Skip to main content
Version: V2 (Ignition 8.1)

system.mes.inventory.setProductionOrderForOperation

Description

Sets the production order for a given Operations record. productionOrderIdOrName is required, plus either operationId, or both locationId and operationName to identify the operation.

Permissions

This method requires the OPERATION.WRITE.SAVE permission.

Syntax

productionOrderIdOrName is required. Identify the operation by either operationId, or both locationId and operationName.

# Set by operation ID
system.mes.operation.setProductionOrderForOperation(operationId=operationId, productionOrderIdOrName=productionOrderIdOrName)

# Set by location and operation name
system.mes.operation.setProductionOrderForOperation(locationId=locationId, operationName=operationName, productionOrderIdOrName=productionOrderIdOrName)

Parameters

ParameterTypeNullableDescription
productionOrderIdOrNameStringFalseThe ID or name of the production order to associate with the operation.
operationIdString (ULID)YesThe ID of the operation.
locationIdString (ULID)YesThe ID of the location associated with the operation.
operationNameStringYesThe name of the operation.

Returns

No response is returned.

Code Examples

# Set the production order for an operation
system.mes.operation.setProductionOrderForOperation('01JPBCPKSR-972W3V0Y-H00NNSKQ', '01JPMTA7K3-E8EHA4MD-7C304P4Z')