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
| Parameter | Type | Nullable | Description |
|---|---|---|---|
productionOrderIdOrName | String | False | The ID or name of the production order to associate with the operation. |
operationId | String (ULID) | Yes | The ID of the operation. |
locationId | String (ULID) | Yes | The ID of the location associated with the operation. |
operationName | String | Yes | The 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')