UpdateSpecific Method (BomItemSubst)
- Last UpdatedNov 06, 2025
- 5 minute read
The UpdateSpecific() method updates selected columns of the specified BOM item substitute record in the Bom_Item_Subst table.
'Declaration
Public Shared Sub UpdateSpecific( _
ByVal sessionId As Integer, _
ByVal parentItemId As String, _
ByVal verId As String, _
ByVal bomPos As Integer, _
ByVal altNo As Integer, _
ByVal pref As Integer, _
ByVal substLevel As Integer, _
ByVal itemId As String, _
ByVal reqdGradeCd As DBInt, _
ByVal instruction As DBString, _
ByVal qtyPerParentItem As Nullable(Of Double), _
ByVal maxQtyPerParentItem As DBDouble, _
ByVal minQtyPerParentItem As DBDouble, _
ByVal updateInv As Nullable(Of Boolean), _
ByVal backflush As Nullable(Of Boolean), _
ByVal defReasCd As DBInt, _
ByVal defLotNo As DBString, _
ByVal defSubLotNo As DBString, _
ByVal defStorageEntId As DBInt, _
ByVal defRejectEntId As DBInt, _
ByVal scalingFactor As DBDouble, _
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 estTime As DBDouble, _
ByVal spare1 As DBString, _
ByVal spare2 As DBString, _
ByVal spare3 As DBString, _
ByVal spare4 As DBString, _
ByVal lastEditComment As DBString, _
ByRef lastEditAt As Nullable(Of Date) _
)
'Usage
Dim sessionId As Integer
Dim parentItemId As String
Dim verId As String
Dim bomPos As Integer
Dim altNo As Integer
Dim pref As Integer
Dim substLevel As Integer
Dim itemId As String
Dim reqdGradeCd As DBInt
Dim instruction As DBString
Dim qtyPerParentItem As Nullable(Of Double)
Dim maxQtyPerParentItem As DBDouble
Dim minQtyPerParentItem As DBDouble
Dim updateInv As Nullable(Of Boolean)
Dim backflush As Nullable(Of Boolean)
Dim defReasCd As DBInt
Dim defLotNo As DBString
Dim defSubLotNo As DBString
Dim defStorageEntId As DBInt
Dim defRejectEntId As DBInt
Dim scalingFactor As DBDouble
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 estTime As DBDouble
Dim spare1 As DBString
Dim spare2 As DBString
Dim spare3 As DBString
Dim spare4 As DBString
Dim lastEditComment As DBString
Dim lastEditAt As Nullable(Of Date)
BomItemSubst.UpdateSpecific(sessionId, parentItemId, verId, bomPos, altNo, pref, substLevel, itemId, reqdGradeCd, instruction, qtyPerParentItem, maxQtyPerParentItem, minQtyPerParentItem, updateInv, backflush, defReasCd, defLotNo, defSubLotNo, defStorageEntId, defRejectEntId, scalingFactor, mustConsumeFromInv, mayChooseAltInvLoc, mayCreateNewLots, mustConsumeFromWip, mustConsumeBeforeProd, constantQty, estTime, spare1, spare2, spare3, spare4, lastEditComment, lastEditAt)
public static void UpdateSpecific(
int sessionId,
string parentItemId,
string verId,
int bomPos,
int altNo,
int pref,
int substLevel,
string itemId,
DBInt reqdGradeCd,
DBString instruction,
Nullable<double> qtyPerParentItem,
DBDouble maxQtyPerParentItem,
DBDouble minQtyPerParentItem,
Nullable<bool> updateInv,
Nullable<bool> backflush,
DBInt defReasCd,
DBString defLotNo,
DBString defSubLotNo,
DBInt defStorageEntId,
DBInt defRejectEntId,
DBDouble scalingFactor,
Nullable<bool> mustConsumeFromInv,
Nullable<bool> mayChooseAltInvLoc,
Nullable<bool> mayCreateNewLots,
Nullable<bool> mustConsumeFromWip,
Nullable<bool> mustConsumeBeforeProd,
Nullable<bool> constantQty,
DBDouble estTime,
DBString spare1,
DBString spare2,
DBString spare3,
DBString spare4,
DBString lastEditComment,
ref Nullable<DateTime> lastEditAt
)
Parameters
- sessionId
-
Required. Holds the session ID and thus the user who is making this method call.
- parentItemId
-
Required. Holds the the ID of the of the parent item.
- verId
-
Required. Holds the ID of the BOM version.
- bomPos
-
Required. Holds the BOM position (usually sequential). For by-products, this value is negative. For this item being produced, the BOM position is 0, in which case the item_id is the same as the parent_item_id.
- altNo
Required. Holds the alternative number for the BOM position.
- pref
Optional. Holds the preference of the alternative starting at 1. Lowered-numbered alternatives prefered to high-numbered alternatives.
- substLevel
Optional. Holds the substitution level the user must use. The default is 0.
- itemId
Optional. Holds the ID of the item being produced or consumed.
- reqdGradeCd
Optional. Holds ID of the grade code for the BOM Item. A null indicates that it is disabled.
- instruction
Optional. Holds the instructions on how to consume or produce the item.
- qtyPerParentItem
-
Optional. Holds the quantity of the item required per unit of the current parent item.
- maxQtyPerParentItem
Optional. Holds the maximum quantity of the BOM component required per unit of the current parent item.
- minQtyPerParentItem
Optional. Holds the minimum quantity of the BOM component required per unit of the current parent item.
- updateInv
Optional. Required. Holds a flag that, if set to true, specifies whether the inventory table is updated with item consumption. The default is false.
- backflush
Optional. Holds a flag that, if set to true, specifies whether consumption is backflushed. The default is false.
- defReasCd
-
Optional. Holds the default consumption or production code for the item. If null, it defaults to the value specified for the entity.
- defLotNo
-
Optional. Holds the default item lot number. If null, it defaults to the lot specified for the entity.
- defSubLotNo
Optional. Holds the default item sublot number. If null, it defaults to the lot specified for the entity.
- defStorageEntId
-
Optional. Holds the ID of the default entity. If null, defaults to the default storage entity for the entity.
- defRejectEntId
-
Optional. Holds the ID of the entity for reject production items. If null, the def_storage_ent_id is used.
- scalingFactor
Optional. Holds the scaling factor which is used to get the correct units from item dependent counts.
- mustConsumeFromInv
Optional. Holds a flag that, if set to true, specifies whether consumption should occur from inventory for the item. The default is false.
- mayChooseAltInvLoc
Optional. Holds a flag that, if set to true, specifies whether the user can select alternate inventory locations when consuming or producing the item. The default is true.
- mayCreateNewLots
Optional. Holds a flag that, if set to true, specifies whether the user can create new lots when consuming or producing this item. The default is true. This parameter is relevant only if this item is not consumed from the inventory.
- mustConsumeFromWip
Optional. Holds a flag that, if set to true, specifies whether the lots consumed during a job must be 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 whether to prevent any production transactions until 'acceptable' quantities of BOM components have been consumed, as specified by the 'max_qty_per_parent_item' and 'min_qty_per_parent_item' fields. The default is false.
- constantQty
Optional. Holds a flag that, if set to true, specifies whether the quantities of this item consumed are independent of the quantity of the parent item produced. The default is false.
- estTime
Optional. Holds the number of hours it should take to consume or produce this component per unit of BOM position zero. The default is null for BOM position zero.
- spare1
Optional. Holds the contents of the user-defined spare1 field.
- spare2
Optional. Holds the contents of the user-defined spare2 field.- spare3
Optional. Holds the contents of the user-defined spare3 field.
- spare4
Optional. Holds the contents of the user-defined spare4 field.
- lastEditComment
Optional. Holds comments that describe why this record is being updated.
- lastEditAt
Required. Holds the date/time when this record was added or last updated, for optimistic concurrency control. The passed value must match the lastEditAt value in the record for the update to succeed.
Output. Holds the date/time value when the record was updated by this called method.
Observe the following input parameter rules:
- Optional non-DB* parameters: Either enter a new value or leave the existing value unchanged by passing a null.
- Optional DB* parameters: To clear the existing value and enter an empty value, pass DB*.null (e.g., DBInt.null). To leave the existing value unchanged, pass a null.