# system.kanoa.asset.deleteState(stateId, userId)

Delete an state. If the state has been used then the enabled property will be set to False

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

---
### Returns
**# of records modified** `Integer`<br />
**msg** `String` 'Deleted', 'Disabled' or error message<br />

---
### Example
```python
stateId = 1
recordsModified, statusMsg = system.kanoa.asset.deleteState(stateId)
```
