system.kanoa.inventory.getCostCenters(paramsDict)
Retrieves cost center records defined in the Kanoa MES inventory module.
Results can be filtered by cost center id, code, or name by supplying any combination of those keys in paramsDict;
omitting a key (or passing an empty dictionary) means that field is not used as a filter.
This function is commonly used to populate cost center lookups/dropdowns in the UI or to validate that a cost center exists before assigning it elsewhere.
Parameters
paramsDict Dictionary
| - costCenterCode | String | |
| - costCenterId | Integer | |
| - costCenterName | String |
Returns
data pyDataset
Example
# Look up a single cost center by its code
paramsDict = {"costCenterCode": "MNT"}
data = system.kanoa.inventory.getCostCenters(paramsDict)
costCenterInfo = system.kanoa.utilities.convertDatasetRowToJSON(data, 0)
for k,v in costCenterInfo.items():
print k,v
>>>
costCenterCode MNT
lastUpdatedBy jason
createdByUser jason
enabled True
changedDate None
lastUpdated Sun May 17 12:41:01 UTC 2026
createdDate Sun May 17 12:41:01 UTC 2026
costCenterId 2
createdBy 5
changedBy None
costCenterName Maintenance
changedByUser None
>>>