GetNextAltNo Method (BomItemSubst)
- Last UpdatedNov 06, 2025
- 2 minute read
The GetNextAltNo() method returns the next available alternative number and next available preference for the specified substitution BOM item.
'Declaration
Public Shared Sub GetNextAltNo( _
ByVal sessionId As Integer, _
ByVal parentItemId As String, _
ByVal verId As String, _
ByVal bomPos As Nullable(Of Integer), _
ByRef nextAltNo As Nullable(Of Integer), _
ByRef nextPref As Nullable(Of Integer) _
)
'Usage
Dim sessionId As Integer
Dim parentItemId As String
Dim verId As String
Dim bomPos As Nullable(Of Integer)
Dim nextAltNo As Nullable(Of Integer)
Dim nextPref As Nullable(Of Integer)
BomItemSubst.GetNextAltNo(sessionId, parentItemId, verId, bomPos, nextAltNo, nextPref)
public static void GetNextAltNo(
int sessionId,
string parentItemId,
string verId,
Nullable<int> bomPos,
out Nullable<int> nextAltNo,
out Nullable<int> nextPref
)
Parameters
- sessionId
Optional. 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
Optional. Holds the ID of the BOM version.
- bomPos
Optional. 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.
- nextAltNo
Output. Holds the next alternative number for the specific substitution item. If the value is 1, then this is the first substitute BOM item for the item.
- nextPref
Output. Holds the next preference for the specific substituion item.