Skip to main content

system.kanoa.inventory.updateManufacturer(manufacturerInfo, userId)

Updates an existing manufacturer record. Pass a manufacturerInfo dict containing the manufacturerId of the record to update along with any fields that should change (name, code, website, enabled status). Only the fields supplied are affected; the userId is recorded for audit purposes.


Parameters

manufacturerInfo Dictionary

- enabledBoolean
- manufacturerCodeString
- manufacturerIdInteger
- manufacturerNameString
- websiteUrlString

userId Integer:Id of the user executing the function


Returns

# of records modified Integer
message String None if success


Example

manufacturerInfo = {
'manufacturerId': 42,
'manufacturerName': 'SKF',
'manufacturerCode': 'SKF-01',
'websiteUrl': 'https://www.skf.com',
'enabled': True
}
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})

recordsModified, message = system.kanoa.inventory.updateManufacturer(manufacturerInfo, userId)
print recordsModified, message