Skip to main content

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
userId Integer:Id of the user executing the function


Returns

# of records modified Integer
msg String None if success


Example

maintenanceTypeId = 4
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
recordsModified, msg = system.kanoa.cmms.deleteMaintenanceType(maintenanceTypeId, userId)
print recordsModified, msg