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
| - accountNumber | String | |
| - contactName | String | |
| String | ||
| - enabled | Boolean | |
| - phone | String | |
| - supplierId | (int) | |
| - supplierName | String | |
| - websiteUrl | String |
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