system.kanoa.inventory.addCostCenter(costCenterInfo, userId)
Adds a new cost center record, used to associate inventory transactions and consumption with a specific budget or department. The caller supplies a dictionary containing the cost center's code and display name along with the id of the user performing the action for audit purposes. On success, the newly generated cost center id is returned.
Parameters
costCenterInfo Dictionary
| - costCenterCode | String | |
| - costCenterName | String |
userId Integer:Id of the user executing the function
Returns
costCenterId Integer
message String None if success
Example
costCenterInfo = {
'costCenterCode': 'MAINT-L3',
'costCenterName': 'Maintenance - Line 3'
}
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
costCenterId, message = system.kanoa.inventory.addCostCenter(costCenterInfo, userId)
print costCenterId, message