Add Method (BomItemOperLink)
- Last UpdatedMar 17, 2026
- 4 minute read
The Add() method adds a new BOM item/operation link record to the Bom_Item_Oper_Link table.
'Declaration
Public Shared Sub Add( _
ByVal sessionId As Integer, _
ByVal parentItemId As String, _
ByVal verId As String, _
ByVal bomPos As Integer, _
ByVal processId As String, _
ByVal operId As String, _
ByVal qtyPerParentItem As Double, _
ByVal reqdStartPct As Nullable(Of Double), _
ByVal defReasCd As DBInt, _
ByVal defLotNo As DBString, _
ByVal defSubLotNo As DBString, _
ByVal defStorageEntId As DBInt, _
ByVal defRejectEntId As DBInt, _
ByVal updateInv As Nullable(Of Boolean), _
ByVal backflush As Nullable(Of Boolean), _
ByVal mustConsumeFromInv As Nullable(Of Boolean), _
ByVal mayChooseAltInvLoc As Nullable(Of Boolean), _
ByVal mayCreateNewLots As Nullable(Of Boolean), _
ByVal mustConsumeFromWip As Nullable(Of Boolean), _
ByVal mustConsumeBeforeProd As Nullable(Of Boolean), _
ByVal constantQty As Nullable(Of Boolean), _
ByVal lastEditComment As DBString, _
ByRef modId As String _
)
'Usage
Dim sessionId As Integer
Dim parentItemId As String
Dim verId As String
Dim bomPos As Integer
Dim processId As String
Dim operId As String
Dim qtyPerParentItem As Double
Dim reqdStartPct As Nullable(Of Double)
Dim defReasCd As DBInt
Dim defLotNo As DBString
Dim defSubLotNo As DBString
Dim defStorageEntId As DBInt
Dim defRejectEntId As DBInt
Dim updateInv As Nullable(Of Boolean)
Dim backflush As Nullable(Of Boolean)
Dim mustConsumeFromInv As Nullable(Of Boolean)
Dim mayChooseAltInvLoc As Nullable(Of Boolean)
Dim mayCreateNewLots As Nullable(Of Boolean)
Dim mustConsumeFromWip As Nullable(Of Boolean)
Dim mustConsumeBeforeProd As Nullable(Of Boolean)
Dim constantQty As Nullable(Of Boolean)
Dim lastEditComment As DBString
Dim modId As String
BomItemOperLink.Add(sessionId, parentItemId, verId, bomPos, processId, operId, qtyPerParentItem, reqdStartPct, defReasCd, defLotNo, defSubLotNo, defStorageEntId, defRejectEntId, updateInv, backflush, mustConsumeFromInv, mayChooseAltInvLoc, mayCreateNewLots, mustConsumeFromWip, mustConsumeBeforeProd, constantQty, lastEditComment, modId)
public static void Add(
int sessionId,
string parentItemId,
string verId,
int bomPos,
string processId,
string operId,
double qtyPerParentItem,
Nullable<double> reqdStartPct,
DBInt defReasCd,
DBString defLotNo,
DBString defSubLotNo,
DBInt defStorageEntId,
DBInt defRejectEntId,
Nullable<bool> updateInv,
Nullable<bool> backflush,
Nullable<bool> mustConsumeFromInv,
Nullable<bool> mayChooseAltInvLoc,
Nullable<bool> mayCreateNewLots,
Nullable<bool> mustConsumeFromWip,
Nullable<bool> mustConsumeBeforeProd,
Nullable<bool> constantQty,
DBString lastEditComment,
out string modId
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- parentItemId
- Required. Holds the ID of the parent item that is being linked to an operation.
- verId
- Required. Holds the ID of the BOM version.
- bomPos
Required. Holds the BOM position. The BOM position is not necessarily in a sequence.
- processId
- Required. Holds the ID of a process to which the operation belongs.
- operId
- Required. Holds the ID of the operation that is being linked to an item.
- qtyPerParentItem
Required. Holds the item quantity per parent item for the current operation. For by-products, this value is less than zero.
- reqdStartPct
Optional. Holds the percentage of this component (or, if the BOM position is zero, of the input quantity of the item itself) that is required before the operation becomes Ready. The default is 0.
- defReasCd
Optional. Holds the default consumption or production code for an item. If null, it defaults to the value specified in the BOM_Item table.
- defLotNo
Optional. Holds the default lot number of this item. If null, it defaults to the lot number specified in the BOM_Item table.
- defSubLotNo
Optional. Holds the default sublot number of this item. If null, it defaults to the sublot number specified in the BOM_Item table.
- defStorageEntId
Optional. Holds the ID of the default storage entity of a product or by-product. If null, it defaults to the default storage entity specified in the BOM_Item table.
- defRejectEntId
Optional. Holds the ID of the default storage entity for the rejected production items. If null, the def_storage_ent_id is used.
- updateInv
Optional. Holds a flag that, if set to true, specifies that the inventory table is updated with consumed items. The default is false.
- backflush
Optional. Holds a flag that, if set to true, specifies that consumption is backflushed. The default is false.
- mustConsumeFromInv
Optional. Holds a flag that, if set to true, specifies that consumption must occur from the inventory for this item. The default is false.
- mayChooseAltInvLoc
Optional. Holds a flag that, if set to true, specifies that a user can select alternate inventory locations when consuming or producing this item. The default is true.
- mayCreateNewLots
Optional. Holds a flag that, if set to true, specifies that a user can create new lots when consuming or producing this item. The default is true. This parameter is relevant only if the items are not consumed from the inventory.
- mustConsumeFromWip
Optional. Holds a flag that, if set to true, specifies that the lots consumed during a job are limited to the lots produced to the Item_Inv table for the same work order in an upstream job. The default is false.
- mustConsumeBeforeProd
Optional. Holds a flag that, if set to true, specifies that the production transactions are prevented until 'acceptable' quantities of BOM components are consumed, as specified in the maxQtyPerParentItem and minQtyPerParentItem parameters. The default is false.
- constantQty
Optional. Holds a flag that, if set to true, specifies that the quantity of a consumed item is independent of the quantity of a parent item that is produced. The default is false.
- lastEditComment
Optional. Holds comments that describe why this record is being added.
- modId
Output. Holds the modification ID assigned to this record when it is added. The modId parameter is used by other methods that modify or delete this type of record for optimistic concurrency control.
Observe the following input parameter rules:
- Required non-DB* parameters: Must pass a value. Cannot be empty or null.
- Optional non-DB* parameters: Either enter a value or pass a null. If passing a null and a default value has been defined, the default value will be used for the parameter.
- Required DB* parameters: Must pass a value. To enter an empty value for the parameter, pass DB*.null (e.g., DBInt.null).
- Optional DB* parameters: To enter no value for the parameter, pass DB*.null (e.g., DBInt.null). To use the default value for the parameter if one has been defined for the object being added, pass a null.