Skip to main content

system.kanoa.inventory.updateSupplier(supplierInfo, userId)

Updates an existing supplier record. The supplierInfo dictionary must include the supplierId of the record being modified along with any fields to change; unspecified fields are left as-is. The userId is recorded for auditing who performed the update.


Parameters

supplierInfo Dictionary

- accountNumberString
- contactNameString
- emailString
- enabledBoolean
- phoneString
- supplierId(int)
- supplierNameString
- websiteUrlString

userId Integer:Id of the user executing the function


Returns

# of records modified Integer
message String None if success


Example

supplierInfo = {
'supplierId': 4417,
'phone': '800-555-0199',
'contactName': 'Miguel Torres',
'enabled': True
}
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})

recordsModified, message = system.kanoa.inventory.updateSupplier(supplierInfo, userId)
print recordsModified, message