system.kanoa.inventory.updateUnitOfMeasure(unitOfMeasureInfo, userId)
Updates an existing unit of measure record in the Kanoa MES inventory module.
The record to update, along with the field values to apply, is passed as the unitOfMeasureInfo dictionary (it must include the uomId of the record being updated),
and userId records who performed the change for audit purposes.
This can also be used to disable a unit of measure by setting enabled to False rather than deleting it outright.
Parameters
unitOfMeasureInfo Dictionary
| - enabled | Boolean | |
| - uomCode | String | |
| - uomId | Integer | |
| - uomName | String |
userId Integer:Id of the user executing the function
Returns
# of records modified Integer
message String None if success
Example
unitOfMeasureInfo = {
"uomId": 8,
"uomCode": "FT",
"uomName": "Feet",
"enabled": True
}
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
recordsModified, message = system.kanoa.inventory.updateUnitOfMeasure(unitOfMeasureInfo, userId)
print recordsModified, message