system.kanoa.inventory.addAssetBomItem(bomInfo, userId)
Adds or updates a BOM item on an asset instance.
Parameters
bomInfo Dictionary
| - assetBomId | Integer | Not required, pass to update |
| - assetId | Integer | |
| - enabled | Boolean | Not required |
| - modelId | Integer | Not required, mutually exclusive with partId |
| - notes | String | Not required |
| - parentBomId | Integer | Not required |
| - partId | Integer | Not required, mutually exclusive with modelId |
| - positionCode | String | Not required |
| - positionName | String | Not required |
| - quantity | Float | |
| - uomId | Integer |
userId Integer:Id of the user executing the function
Returns
assetBomId Integer
message String None if success
Example
# Add a part to an asset's BOM
assetBomId, err = system.kanoa.inventory.addAssetBomItem({
'assetId': assetId,
'partId': partId,
'quantity': 2,
'uomId': uomId,
'positionCode': 'P1-A',
'positionName': 'Drive Shaft Bearing',
}, userId)