Skip to main content
Version: V3 (Ignition 8.3)

system.mes.productionOrder.startProductionOrder

Description

Marks a production order as started. Sets the order status to RUNNING, records the start time, clears the end date, and resolves the active shift record for the order's location at the start time.

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.startProductionOrder(idOrName, [startDate], [quantity], [quantityScheduled])

Parameters

ParameterTypeNullableDescription
idOrNameStringFalseThe ULID or name of the production order.
startDateDateTrueOptional start time. If null, the current time is used.
quantityDoubleTrueOptional total quantity to set on the order.
quantityScheduledDoubleTrueOptional scheduled quantity to set on the order.

Returns

Returns a JSON representation of the updated production order.

Code Examples

# Start a production order now
order = system.mes.productionOrder.startProductionOrder(idOrName="ORDER-001", startDate=system.date.now())
print order["status"] # "RUNNING"