GetAll Method (BomItemSubst)
- Last UpdatedNov 06, 2025
- 6 minute read
The GetAll() method retrieves one or more BOM item substitute records from the Bom_Item_Subst table, as specified by the filter parameters. Passing no filter parameters will retrieve all BOM item substitute records from the table.
'Declaration
Public Shared Function GetAll( _
ByVal parentItemId As String, _
ByVal verId As String, _
ByVal bomPos As Nullable(Of Integer), _
ByVal altNo As Nullable(Of Integer), _
ByVal pref As Nullable(Of Integer), _
ByVal substLevel As Nullable(Of Integer), _
ByVal itemId As String, _
ByVal reqdGradeCd As Nullable(Of Integer), _
ByVal updateInv As Nullable(Of Boolean), _
ByVal backflush As Nullable(Of Boolean), _
ByVal defReasCd As Nullable(Of Integer), _
ByVal defLotNo As String, _
ByVal defSubLotNo As String, _
ByVal defStorageEntId As Nullable(Of Integer), _
ByVal defRejectEntId As Nullable(Of Integer), _
ByVal spare1 As String, _
ByVal spare2 As String, _
ByVal spare3 As String, _
ByVal spare4 As String, _
ByVal lastEditBy As String, _
ByVal lastEditAt As Nullable(Of Date) _
) As DataSet
'Usage
Dim parentItemId As String
Dim verId As String
Dim bomPos As Nullable(Of Integer)
Dim altNo As Nullable(Of Integer)
Dim pref As Nullable(Of Integer)
Dim substLevel As Nullable(Of Integer)
Dim itemId As String
Dim reqdGradeCd As Nullable(Of Integer)
Dim updateInv As Nullable(Of Boolean)
Dim backflush As Nullable(Of Boolean)
Dim defReasCd As Nullable(Of Integer)
Dim defLotNo As String
Dim defSubLotNo As String
Dim defStorageEntId As Nullable(Of Integer)
Dim defRejectEntId As Nullable(Of Integer)
Dim spare1 As String
Dim spare2 As String
Dim spare3 As String
Dim spare4 As String
Dim lastEditBy As String
Dim lastEditAt As Nullable(Of Date)
Dim value As DataSet
value = BomItemSubst.GetAll(parentItemId, verId, bomPos, altNo, pref, substLevel, itemId, reqdGradeCd, updateInv, backflush, defReasCd, defLotNo, defSubLotNo, defStorageEntId, defRejectEntId, spare1, spare2, spare3, spare4, lastEditBy, lastEditAt)
public static DataSet GetAll(
string parentItemId,
string verId,
Nullable<int> bomPos,
Nullable<int> altNo,
Nullable<int> pref,
Nullable<int> substLevel,
string itemId,
Nullable<int> reqdGradeCd,
Nullable<bool> updateInv,
Nullable<bool> backflush,
Nullable<int> defReasCd,
string defLotNo,
string defSubLotNo,
Nullable<int> defStorageEntId,
Nullable<int> defRejectEntId,
string spare1,
string spare2,
string spare3,
string spare4,
string lastEditBy,
Nullable<DateTime> lastEditAt
)
Parameters
- parentItemId
Optional filter parameter. Holds the ID of a parent item.
- verId
Optional filter parameter. Holds the ID of a BOM version.
- bomPos
Optional filter parameter. Holds the ID of a BOM position.
- altNo
Optional filter parameter. Holds the alternative number for a BOM position.
- pref
Optional filter parameter. Holds the preference of an alternative starting at 1. A lower numbered alternative is preferred over a higher numbered alternative.
- substLevel
Optional filter parameter. Holds a substitution level that a user must use. The default is 0.
- itemId
Optional filter parameter. Holds the ID of an item being produced or consumed.
- reqdGradeCd
Optional filter parameter. Holds the grade code for a BOM Item. If null, A Null indicates that it is disabled.
- updateInv
Optional filter parameter. Holds a flag that specifies whether the inventory table is updated with item consumption.
- backflush
Optional filter parameter. Holds a flag that specifies whether the consumption is backflushed.
- defReasCd
Optional filter parameter. Holds the default consumption or production code of an item.
- defLotNo
Optional filter parameter. Holds the default lot number of an item.
- defSubLotNo
Optional filter parameter. Holds the default sublot number of an item.
- defStorageEntId
Optional filter parameter. Holds the default entity of a component, product, or byproduct. If null, it defaults to the default storage entity on which the job is run.
- defRejectEntId
Optional filter parameter. Holds the default entity for reject production items. If null, the def_storage_ent_id is used.
- spare1
Optional filter parameter. Holds the contents of a user-defined spare1 field.
- spare2
Optional filter parameter. Holds the contents of a user-defined spare2 field.
- spare3
Optional filter parameter. Holds the contents of a user-defined spare3 field.
- spare4
Optional filter parameter. Holds the contents of a user-defined spare4 field.
- lastEditBy
Optional filter parameter. Holds the ID of a user who added or last updated a BOM item substitute record.
- lastEditAt
Optional filter parameter. Holds the date and time when a BOM item substitute record was added or last updated.
Return Value
Returns a DataSet that contains all the records in the Bom_Item_Subst table that satisfy the specified filters. If no matching records are found, an empty DataSet is returned.
The columns of the returned DataSet are described below.
|
Column Name |
Description |
|---|---|
|
parent_item_id |
A string that is the ID of the item being made. |
|
parent_item_desc |
A string that is the description of the parent item from the item table. |
|
ver_id |
A string that is ID of the version of the BOM. |
|
bom_pos |
An integer that is the BOM position. |
|
alt_no |
An integer that is the alternative number for a given BOM position. |
|
pref |
An integer that is the preference value of the alternative. |
|
subst_level |
An integer that is the substitution level the user must have in order to use the substitute. |
|
Item_id |
A string that is the ID of the substitute item being produced or consumed. |
|
Item_desc |
A string that is the description of the substitute item, from the item table. |
|
reqd_grade_cd |
An integer that is the required grade code for the BOM item. |
|
Instruction |
A string that is the optional instruction on how to consume this item. |
|
qty_per_parent_item |
A double-precision floating point number that specifices nominal quantity of item per unit of immediate parent item for this step. It is less than 0 for the byproducts. |
|
max_qty_per_parent_item |
A double-precision floating point number that specifies the maximum acceptable quantity of this BOM component. |
|
min_qty_per_parent_item |
A double-precision floating point number that specifies the minimum acceptable quantity of this BOM component. |
|
update_inv |
A Boolean that is a flag that specifies whether the inventory table should be updated with item consumption. |
|
backflush |
A Boolean that is a flag that specifies whether there is a backflush consumption. |
|
def_reas_cd |
An integer that is the default consumption or production code for the item. |
|
def_lot_no |
A string that is the default lot number. |
|
def_sublot_no |
A string that is the default sublot number. |
|
def_storage_ent_id |
An integer that is the ID of the default entity to get component or put by product. |
|
ent_name |
A string that is a value that specifies the entity name of the default entity. |
|
def_reject_ent_id |
An integer that is the default storage entity for reject production items. |
|
scaling_factor |
A double-precision floating point number which specifies the scaling factor to get correct units from counts if counts are item dependent. |
|
must_consume_from_inv |
A Boolean that is a flag that specifies whether consumption must occur from inventory for this item. |
|
may_choose_alt_inv_loc |
A Boolean that is a flag that specifies whether the user can select alternate inventory locations when consuming or producing this item. |
|
may_create_new_lots |
A Boolean that is a flag that specifies whether the user can create new lots when consuming or producing this item. |
|
must_consume_from_wip |
A Boolean that is a flag that specifies whether the lots consumed during a job must be limited to those lots produced to the item_inv table for the same wo_id in an upstream job. |
|
must_consume_before_prod |
A Boolean that is a flag that 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. |
|
constant_qty |
A Boolean that is a flag that specifies whether the quantities consumed of this item are independent of quantity of parent item produced. |
|
est_time |
A double-precision floating point number which specifies the number of hours it has to take to consume or produce this component, per unit of BOM pos 0. |
|
spare1 |
A string that is the value of the spare1 field. |
|
spare2 |
A string that is the value of the spare2 field. |
|
spare3 |
A string that is the value of the spare3 field. |
|
spare4 |
A string that is the value of the spare4 field. |
|
last_edit_comment |
A string that contains comments about why the record was added or updated. |
|
last_edit_by |
A string that is the ID of the user who added or last updated this record. |
|
last_edit_at |
A date and time that indicates when the record was added or last updated. |
|
uom_id |
An integer that is the ID of the unit of measure for the item being produced or consumed, from item table . |
|
num_decimals |
An integer that is the number of decimals allowed for the item quantity, from item table. |