system.mes.productionOrder.setPropertyValue
Description
Updates the value of a Production Order Property Values record given a production order ID or name and a property ID or name.
Permissions
This method requires the PRODUCTION_ORDER.WRITE.SAVE permission.
Syntax
system.mes.productionOrder.setPropertyValue(productionOrderIdOrName, propertyIdOrName, value)
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
productionOrderIdOrName | String | False | The ULID or name of the production order. |
propertyIdOrName | String | False | The ULID or name of the property for which the value is retrieved. |
value | Mixed | True | The value assigned to the property. The type is mixed as it depends on the data type of the property. May be None to clear the value, but only when the property definition is nullable; passing None for a non-nullable property raises an error. |
Returns
Returns a JSON representation of the updated production order property value.
Code Examples
# Update the value of a production order property value
updatedPropertyValue = system.mes.productionOrder.setPropertyValue('01JPMTA7K3-E8EHA4MD-7C304P4Z', 'Batch Size', 200)
# Output the JSON representation of the updated production order property value
print(updatedPropertyValue)
# Clear the value of a nullable property by passing None
system.mes.productionOrder.setPropertyValue('01JPMTA7K3-E8EHA4MD-7C304P4Z', 'OrderStartForScheduling', None)