Split(Int32,Int32,Nullable<DateTime>,Double,Nullable<Double>,Nullable<Int32>,String,String,String,Nullable<Int32>,Nullable<Int32>,Nullable<Int32>,Nullable<DateTime>,String) Method
- Last UpdatedNov 06, 2025
- 3 minute read
The Split() method splits a quantity of an item with given dependent data to a storage location.
This overload of the method uses UTC for the inventory expiry date and time (expiryDateUtc parameter).
'Declaration
Public Overloads Shared Sub Split( _
ByVal sessionId As Integer, _
ByVal rowId As Integer, _
ByVal lastEditAt As Nullable(Of Date), _
ByVal splitQty As Double, _
ByVal splitQtyErp As Nullable(Of Double), _
ByVal entId As Nullable(Of Integer), _
ByVal itemId As String, _
ByVal lotNo As String, _
ByVal subLotNo As String, _
ByVal gradeCd As Nullable(Of Integer), _
ByVal statusCd As Nullable(Of Integer), _
ByVal uomId As Nullable(Of Integer), _
ByVal expiryDateUtc As Nullable(Of Date), _
ByVal transferComments As String _
)
'Usage
Dim sessionId As Integer
Dim rowId As Integer
Dim lastEditAt As Nullable(Of Date)
Dim splitQty As Double
Dim splitQtyErp As Nullable(Of Double)
Dim entId As Nullable(Of Integer)
Dim itemId As String
Dim lotNo As String
Dim subLotNo As String
Dim gradeCd As Nullable(Of Integer)
Dim statusCd As Nullable(Of Integer)
Dim uomId As Nullable(Of Integer)
Dim expiryDateUtc As Nullable(Of Date)
Dim transferComments As String
StorageExec.Split(sessionId, rowId, lastEditAt, splitQty, splitQtyErp, entId, itemId, lotNo, subLotNo, gradeCd, statusCd, uomId, expiryDateUtc, transferComments)
public static void Split(
int sessionId,
int rowId,
Nullable<DateTime> lastEditAt,
double splitQty,
Nullable<double> splitQtyErp,
Nullable<int> entId,
string itemId,
string lotNo,
string subLotNo,
Nullable<int> gradeCd,
Nullable<int> statusCd,
Nullable<int> uomId,
Nullable<DateTime> expiryDateUtc,
string transferComments
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- rowId
- Required. Holds the ID of the row in the Item_Inventory table that corresponds to the item whose quantity is being split to another location.
- lastEditAt
- Optional. Holds the date/time when item's record in the Item_Inv table was added or last edited, for optimistic concurrency control. If it is specified, the passed value must match the lastEditAt value in the record for the change to succeed.
- splitQty
- Required. Holds the quantity to be split to the new location.
- splitQtyErp
- Optional. Holds the amount of the split quantity that has already been reported to the ERP system.
- entId
- Optional. Holds the ID of the entity that represents the location to which the quantity is being split.
- itemId
- Optional. Holds the ID of the item being split to the new location. Defaults to the ID of the source item.
- lotNo
- Optional. Holds the lot number of the item being split to the new location. Defaults to the lot number of the source item.
- subLotNo
- Optional. Holds the sublot number of the item being split to the new location. Defaults to the sublot number of the source item.
- gradeCd
- Optional. Holds the grade code of the item being split to the new location. Defaults to the grade code of the source item.
- statusCd
- Optional. Holds the status code of the item being split to the new location. Defaults to the status code of the source item.
- uomId
- Optional. Holds the ID of the unit of measure for the item being split to the new location.
- expiryDateUtc
- Optional. Holds the expiry date and time, in UTC, for the item being split to the new location. Note that the expiry date and time is not calculated based on the item's lifetime value.
- transferComments
- Optional. Holds comments about the item quantity split that is being made.
Observe the following two 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.
- The oldRowId parameter identifies the row in the Item_Inventory table of the item from which the specified quantity is to be split. If the row does not exist , the method will fail.
- The split_qty must be <= the qty_left in the source row; otherwise, the method will fail.
- At least one of the new_ent_id, new_item_id, or new_lot_no fields must be specified, as this is required to specify a new row in the Item_Inv table.
- If the destination row already exists, then this quantity will be added to the existing quantity in that row. In this case, if any of the dependent data (grade, status, expiry date, work order data) does not match between the source and destination rows, the method will fail.
- If the new_ent_id field does not have the “can_store’ capability or the status field of the new_ent_id is ‘Inactive’, then the method will fail.