GetAll Method (ItemSubstitute)
- Last UpdatedNov 06, 2025
- 5 minute read
The GetAll() method retrieves one or more item substitute records from the Item_Subst table, as specified by the filter parameters. Passing no filter parameters will retrieve all item substitute records from the table.
'Declaration
Public Shared Function GetAll( _
ByVal origItemId As String, _
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 origItemId As String
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 = ItemSubstitute.GetAll(origItemId, altNo, pref, substLevel, itemId, reqdGradeCd, updateInv, backflush, defReasCd, defLotNo, defSublotNo, defStorageEntId, defRejectEntId, spare1, spare2, spare3, spare4, lastEditBy, lastEditAt)
public static DataSet GetAll(
string origItemId,
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
- origItemId
Optional filter parameter. Holds the ID of an item that is being substituted.
- altNo
Optional. Holds an index to this item that is used to identify it as an substitute (alternate) for another item.
- pref
Optional filter parameter. Holds an integer that is used to sort the alternatives for this item from most preferred (lowest number) to least preferred (highest) number.
- substLevel
Optional filter parameter. Holds a substitution level to filter the dataset.
- itemId
Optional filter parameter. Holds the ID of a substitution item being produced or consumed.
- reqdGradeCd
-
Optional filter parameter. Holds the required grade code of a BOM item.
- updateInv
Optional filter parameter. Holds a flag that, if set to true, specifies whether to update inventory table with item consumption.
- backflush
Optional filter parameter. Holds a flag that, if set to true, specifies whether to filter the dataset by backflush consumption.
- defReasCd
Optional filter parameter. Holds the default consumption or production code for 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 ID of a default entity to get componet or put by-product.
- defRejectEntId
Optional filter parameter. Holds the ID of a default entity for rejected production items.
- spare1
Optional filter parameter. Holds the contents of the user-defined spare1 field.
- spare2
Optional filter parameter. Holds the contents of the user-defined spare2 field.
- spare3
Optional filter parameter. Holds the contents of the user-defined spare3 field.
- spare4
Optional filter parameter. Holds the contents of the user-defined spare4 field.
- lastEditBy
Optional filter parameter. Holds the ID of the user who added or last updated a substitution item record.
- lastEditAt
Optional filter parameter. Holds the date/time when a substitution item record was added or last updated.
Return Value
Returns a DataSet that contains records for all the item substitutes that satisfy the specified filters. The returned records include columns from the Item_Subst, Ent, and Item tables. If no matching item substitutes are found, an empty DataSet is returned. The columns of the returned DataSet are described below.
|
ColumnName |
Description |
|---|---|
|
orig_item_id |
A string that is the ID of the item that is being substituted. |
|
alt_no |
An integer that is the alternative number used to filter the dataset. |
|
pref |
An integer that is the preference to filter the dataset. |
|
subst_level |
An integer that is the substitute level of the item. |
|
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 item. |
|
reqd_grade_cd |
An integer that is the required grade code for 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 is the nominal quantity of item required per unit of immediate parent item. |
|
max_qty_per_parent_item |
A double-precision floating point number that is the maximum acceptable quantity of this BOM component. |
|
min_qty_per_parent_item |
A double-precision floating point number that is the minimum acceptable quantity of this BOM component. |
|
update_inv |
A Boolean that is a flag that specifies whether to update inventory table with item consumption. |
|
backflush |
A Boolean that is a flag that specifies 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 from which to consume. |
|
def_sublot_no |
A string that is the default sublot number from which to consume. |
|
def_storage_ent_id |
An integer that is ID of the default entity to get component or put by-product. |
|
ent_name |
A string that is the entity name, from the Ent table. |
|
def_reject_ent_id |
An integer that is the ID of the default entity for rejected production items. |
|
scaling_factor |
A double-precision floating point number that is 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 whetherthe user selects alternate inventory locations when consuming or producing this item. |
|
may_create_new_lots |
A Boolean that is a flag that specifies whether the user create new lots when consuming or producing this item. |
|
must_consume_from_wip |
A Boolean that is a flag that specifieswhether 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 specifieswhether 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 the quantity of the parent item produced. |
|
est_time |
A double-precision floating point number that is the time it takes to consume or produce this component, per unit of BOM_pos 0. |
|
spare1 |
A string that is the contents of the user-defined spare1 field. |
|
spare2 |
A string that is the contents of the user-defined spare2 field. |
|
spare3 |
A string that is the contents of the user-defined spare3 field. |
|
spare4 |
A string that is the contents of the user-defined 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/time that indicates when the record was added or last updated. |
|
row_id |
An integer that is ID of the row. |
|
uom_id |
An integer that is the ID of the UOM. |
|
num_decimals |
An integer that is the numeric decimal. |