# system.kanoa.cmms.deleteMaintenanceType(maintenanceTypeId, userId)

Deletes an existing maintenance type identified by `maintenanceTypeId`. 
Referential integrity is enforced at the database level: if the maintenance type is currently in use (for example, by child `MaintenanceSubType` records or work orders), 
the underlying SQL will prevent the deletion from completing.

---
### Parameters
**maintenanceTypeId** `Integer`: Id of the maintenance 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
maintenanceTypeId = 4
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
recordsModified, msg = system.kanoa.cmms.deleteMaintenanceType(maintenanceTypeId, userId)
print recordsModified, msg
```
