# system.kanoa.cmms.deleteMaintenanceSubType(maintenanceSubTypeId, userId)

Deletes an existing maintenance sub type identified by `maintenanceSubTypeId`. Referential integrity is enforced at the database level: 
if the sub type is currently referenced by other records (for example, work orders or maintenance history), the underlying SQL will prevent the deletion from completing.

---
### Parameters
**maintenanceSubTypeId** `Integer`: Id of the maintenance sub type to delete<br />
**userId** `Integer`:Id of the user executing the function<br />

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

---
### Example
```python
maintenanceSubTypeId = 12
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
recordsModified, msg = system.kanoa.cmms.deleteMaintenanceSubType(maintenanceSubTypeId, userId)
print recordsModified, msg
```
