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
userId Integer:Id of the user executing the function
Returns
# of records modified Integer
msg String None if success
Example
maintenanceSubTypeId = 12
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
recordsModified, msg = system.kanoa.cmms.deleteMaintenanceSubType(maintenanceSubTypeId, userId)
print recordsModified, msg