Skip to main content

system.kanoa.inventory.deleteCostCenter(costCenterId, userId)

Deletes the cost center record identified by the passed costCenterId. Callers should confirm no active parts, purchase orders, or transactions still reference the cost center before deleting it. The userId is recorded for auditing who performed the deletion.


Parameters

costCenterId Integer: Id of cost center to delete
userId Integer:Id of the user executing the function


Returns

# of records modified Integer
message String None if success


Example

costCenterId = 208
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
recordsModified, message = system.kanoa.inventory.deleteCostCenter(costCenterId, userId)
print recordsModified, message