system.kanoa.inventory.updatePartInventoryBalanceField(partInventoryBalanceId, field, value, userId)
Updates a single named field on a part inventory balance record identified by partInventoryBalanceId.
This is a lighter-weight alternative to updatePartInventoryBalance when only one column needs to change, such as adjusting quantityOnHand after a
spot count without having to resend the entire balance record.
Parameters
partInventoryBalanceId Integer: Id of part inventory balance to update
field String: Valid options are partId, inventoryAssetId, quantityOnHand, quantityReserved, quantityOnOrder, averageUnitCost, lastCountedAtUtc
value String: Value to update to
userId Integer:Id of the user executing the function
Returns
# of records modified Integer
message String None if success
Example
partInventoryBalanceId = 4521
field = "quantityOnHand"
value = "132.5"
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
recordsModified, message = system.kanoa.inventory.updatePartInventoryBalanceField(partInventoryBalanceId, field, value, userId)
print recordsModified, message