# system.kanoa.order.deleteProductionOrderState(workOrderStatusId, userId)

Deletes a production order state. States that are set as reservedBySystem cannot be deleted.

---
### Parameters
**workOrderStatusId** `Integer`: Id of the workOrderStatus to delete<br />
**userId** `Integer`:Id of the user executing the function<br />

---
### Returns
**# of records modified** `Integer`<br />
**message** `String` None if success<br />

---
### Example
```python
success, message = system.kanoa.order.deleteProductionOrderState(1, 123)
```
