Split(Int32,Int32,Double,Nullable<DateTime>,Nullable<Int32>,String,String,String,Nullable<Int32>,Nullable<Int32>,Nullable<Double>,Nullable<Int32>,Nullable<DateTime>,String) Method
- Last UpdatedNov 06, 2025
- 4 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 the local time of the destination storage entity for the inventory expiry date and time (newExpiryDate parameter).
'Declaration
Public Overloads Shared Sub Split( _
ByVal sessionId As Integer, _
ByVal oldRowId As Integer, _
ByVal splitQty As Double, _
ByVal oldLastEditAt As Nullable(Of Date), _
ByVal newEntId As Nullable(Of Integer), _
ByVal newItemId As String, _
ByVal newLotNo As String, _
ByVal newSubLotNo As String, _
ByVal newGradeCd As Nullable(Of Integer), _
ByVal newStatusCd As Nullable(Of Integer), _
ByVal splitQtyErp As Nullable(Of Double), _
ByVal newUomId As Nullable(Of Integer), _
ByVal newExpiryDate As Nullable(Of Date), _
ByVal transferComments As String _
)
'Usage
Dim sessionId As Integer
Dim oldRowId As Integer
Dim splitQty As Double
Dim oldLastEditAt As Nullable(Of Date)
Dim newEntId As Nullable(Of Integer)
Dim newItemId As String
Dim newLotNo As String
Dim newSubLotNo As String
Dim newGradeCd As Nullable(Of Integer)
Dim newStatusCd As Nullable(Of Integer)
Dim splitQtyErp As Nullable(Of Double)
Dim newUomId As Nullable(Of Integer)
Dim newExpiryDate As Nullable(Of Date)
Dim transferComments As String
StorageExec.Split(sessionId, oldRowId, splitQty, oldLastEditAt, newEntId, newItemId, newLotNo, newSubLotNo, newGradeCd, newStatusCd, splitQtyErp, newUomId, newExpiryDate, transferComments)
public static void Split(
int sessionId,
int oldRowId,
double splitQty,
Nullable<DateTime> oldLastEditAt,
Nullable<int> newEntId,
string newItemId,
string newLotNo,
string newSubLotNo,
Nullable<int> newGradeCd,
Nullable<int> newStatusCd,
Nullable<double> splitQtyErp,
Nullable<int> newUomId,
Nullable<DateTime> newExpiryDate,
string transferComments
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- oldRowId
- 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.
- splitQty
- Required. Holds the quantity to be split to the new location.
- oldLastEditAt
- 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.
- newEntId
- Optional. Holds the ID of the entity that represents the location to which the quantity is being split.
- newItemId
- Optional. Holds the ID of the item being split to the new location. Defaults to the ID of the source item.
- newLotNo
- Optional. Holds the lot number of the item being split to the new location. Defaults to the lot number of the source item.
- newSubLotNo
- Optional. Holds the sublot number of the item being split to the new location. Defaults to the sublot number of the source item.
- newGradeCd
- Optional. Holds the grade code of the item being split to the new location. Defaults to the grade code of the source item.
- newStatusCd
- Optional. Holds the status code of the item being split to the new location. Defaults to the status code of the source item.
- splitQtyErp
- Optional. Holds the amount of the split quantity that has already been reported to the ERP system.
- newUomId
- Optional. Holds the ID of the unit of measure for the item being split to the new location.
- newExpiryDate
- Optional. Holds the expiry date and time for the item being split in the local time of the destination storage entity of the new split quantity. 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.