system.kanoa.order.updateProductionOrderStateField(workOrderStatusId, field, value, userId)
Updates the passed field value for the given workOrderStatusId. States that are reserved by system can only have their color changed.
Parameters
workOrderStatusId Integer: Id of the order state to update
field String: Valid options are workOrderStatusName, statusColor, enabled, isActive, canSchedule, canExecute
value pyObject: Value to update to
userId Integer:Id of the user executing the function
Returns
# of records modified Integer
msg String None if successful
Example
userId = 5
retVal = system.kanoa.order.updateProductionOrderStateField(15, 'enabled', True, userId)