system.mes.productionOrder.pauseProductionOrder
Description
Pauses a production order. Sets the status to PAUSED and optionally updates the produced quantity.
caution
Throws if the order's status is already CLOSED - no execution operations are permitted on a closed order.
Permissions
This method requires the PRODUCTION_ORDER.EXECUTE permission.
Syntax
system.mes.productionOrder.pauseProductionOrder(idOrName, [endDate], [quantityProduced])
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
idOrName | String | False | The ULID or name of the production order. |
endDate | Date | True | Optional pause time (informational). |
quantityProduced | Double | True | Optional produced quantity to set on the order. |
Returns
Returns a JSON representation of the updated production order.
Code Examples
# Pause a production order
order = system.mes.productionOrder.pauseProductionOrder(idOrName="ORDER-001", quantityProduced=120.0)
print order["status"] # "PAUSED"