Add Method (ItemTransfer)
- Last UpdatedNov 06, 2025
- 6 minute read
The Add() method adds a new item transfer record to the Item_Transfer table.
'Declaration
Public Shared Sub Add( _
ByVal sessionId As Integer, _
ByVal woId As DBString, _
ByVal operId As DBString, _
ByVal seqNo As DBInt, _
ByVal bomPos As DBInt, _
ByVal toEntId As DBInt, _
ByVal itemId As String, _
ByVal lotNo As DBString, _
ByVal subLotNo As DBString, _
ByVal gradeCd As DBInt, _
ByVal statusCd As DBInt, _
ByVal qtyTxd As Double, _
ByVal uomId As DBInt, _
ByVal expiryDate As DBDateTime, _
ByVal toSpare1 As DBString, _
ByVal toSpare2 As DBString, _
ByVal toSpare3 As DBString, _
ByVal toSpare4 As DBString, _
ByVal toSpare5 As DBString, _
ByVal toSpare6 As DBString, _
ByVal fromWoId As DBString, _
ByVal fromOperId As DBString, _
ByVal fromSeqNo As DBInt, _
ByVal fromEntId As DBInt, _
ByVal fromItemId As DBString, _
ByVal fromLotNo As DBString, _
ByVal fromSubLotNo As DBString, _
ByVal fromGradeCd As DBInt, _
ByVal fromStatusCd As DBInt, _
ByVal fromQtyTxd As DBDouble, _
ByVal fromUomId As DBInt, _
ByVal fromExpiryDate As DBDateTime, _
ByVal fromSpare1 As DBString, _
ByVal fromSpare2 As DBString, _
ByVal fromSpare3 As DBString, _
ByVal fromSpare4 As DBString, _
ByVal fromSpare5 As DBString, _
ByVal fromSpare6 As DBString, _
ByVal qtyTxdErp As DBDouble, _
ByVal goodsReceived As Nullable(Of Boolean), _
ByVal goodsShipped As Nullable(Of Boolean), _
ByVal transferListRowId As DBInt, _
ByVal comments As DBString, _
ByRef modId As String, _
ByRef transId As Integer _
)
'Usage
Dim sessionId As Integer
Dim woId As DBString
Dim operId As DBString
Dim seqNo As DBInt
Dim bomPos As DBInt
Dim toEntId As DBInt
Dim itemId As String
Dim lotNo As DBString
Dim subLotNo As DBString
Dim gradeCd As DBInt
Dim statusCd As DBInt
Dim qtyTxd As Double
Dim uomId As DBInt
Dim expiryDate As DBDateTime
Dim toSpare1 As DBString
Dim toSpare2 As DBString
Dim toSpare3 As DBString
Dim toSpare4 As DBString
Dim toSpare5 As DBString
Dim toSpare6 As DBString
Dim fromWoId As DBString
Dim fromOperId As DBString
Dim fromSeqNo As DBInt
Dim fromEntId As DBInt
Dim fromItemId As DBString
Dim fromLotNo As DBString
Dim fromSubLotNo As DBString
Dim fromGradeCd As DBInt
Dim fromStatusCd As DBInt
Dim fromQtyTxd As DBDouble
Dim fromUomId As DBInt
Dim fromExpiryDate As DBDateTime
Dim fromSpare1 As DBString
Dim fromSpare2 As DBString
Dim fromSpare3 As DBString
Dim fromSpare4 As DBString
Dim fromSpare5 As DBString
Dim fromSpare6 As DBString
Dim qtyTxdErp As DBDouble
Dim goodsReceived As Nullable(Of Boolean)
Dim goodsShipped As Nullable(Of Boolean)
Dim transferListRowId As DBInt
Dim comments As DBString
Dim modId As String
Dim transId As Integer
ItemTransfer.Add(sessionId, woId, operId, seqNo, bomPos, toEntId, itemId, lotNo, subLotNo, gradeCd, statusCd, qtyTxd, uomId, expiryDate, toSpare1, toSpare2, toSpare3, toSpare4, toSpare5, toSpare6, fromWoId, fromOperId, fromSeqNo, fromEntId, fromItemId, fromLotNo, fromSubLotNo, fromGradeCd, fromStatusCd, fromQtyTxd, fromUomId, fromExpiryDate, fromSpare1, fromSpare2, fromSpare3, fromSpare4, fromSpare5, fromSpare6, qtyTxdErp, goodsReceived, goodsShipped, transferListRowId, comments, modId, transId)
public static void Add(
int sessionId,
DBString woId,
DBString operId,
DBInt seqNo,
DBInt bomPos,
DBInt toEntId,
string itemId,
DBString lotNo,
DBString subLotNo,
DBInt gradeCd,
DBInt statusCd,
double qtyTxd,
DBInt uomId,
DBDateTime expiryDate,
DBString toSpare1,
DBString toSpare2,
DBString toSpare3,
DBString toSpare4,
DBString toSpare5,
DBString toSpare6,
DBString fromWoId,
DBString fromOperId,
DBInt fromSeqNo,
DBInt fromEntId,
DBString fromItemId,
DBString fromLotNo,
DBString fromSubLotNo,
DBInt fromGradeCd,
DBInt fromStatusCd,
DBDouble fromQtyTxd,
DBInt fromUomId,
DBDateTime fromExpiryDate,
DBString fromSpare1,
DBString fromSpare2,
DBString fromSpare3,
DBString fromSpare4,
DBString fromSpare5,
DBString fromSpare6,
DBDouble qtyTxdErp,
Nullable<bool> goodsReceived,
Nullable<bool> goodsShipped,
DBInt transferListRowId,
DBString comments,
out string modId,
out int transId
)
Parameters
- sessionId
Required. Holds a session ID and thus the user who is making this method call.
- woId
Optional. Holds the work order for the transfer job while recording an allocation. If the producing job is being changed, then this parameter specifies the work order by which the inventory was produced.
- operId
Optional. Holds the ID of the operation for the job. If the producing job is being changed, then this parameter specifies the new operation by which the inventory was produced.
- seqNo
Optional. Holds the operation sequence number of the job. If the producing job is being changed, then this parameter specifies the new sequence number by which the inventory was produced.
- bomPos
Optional. Holds the BOM position.
- toEntId
Optional. Holds the ID of the destination entity.
- itemId
Required. Holds the ID of the item being transferred.
- lotNo
Optional. Holds the lot number of the item being transferred.
- subLotNo
Optional. Holds the sublot number of the item being transferred.
- gradeCd
Optional. Holds the grade code of the material being transferred.
- statusCd
Optional. Holds the status code of the material being transferred.
- qtyTxd
Required. Holds the quantity of the item being transferred.
- uomId
Optional. Holds the ID of the unit of measure for the quantity being transferred.
- expiryDate
Optional. Holds the expiry date and time for the item at the destination storage entity in the local time of that entity.
- toSpare1
Optional. Holds the contents of the user-defined Spare1 field after the transfer.
- toSpare2
Optional. Holds the contents of the user-defined Spare2 field after the transfer.
- toSpare3
Optional. Holds the contents of the user-defined Spare3 field after the transfer.
- toSpare4
Optional. Holds the contents of the user-defined Spare4 field after the transfer.
- toSpare5
Optional. Holds the contents of the user-defined Spare5 field after the transfer.
- toSpare6
Optional. Holds the contents of the user-defined Spare6 field after the transfer.
- fromWoId
Optional. Holds the ID of the work order by which the inventory was produced.
- fromOperId
Optional. Holds the ID of the operation by which the inventory was produced.
- fromSeqNo
Optional. Holds the sequence number of the operation by which the inventory was produced.
- fromEntId
Optional. Holds the ID of the entity from where the transfer occurs.
- fromItemId
Optional. Holds the ID of the item being transferred from the old location. Null indicates that it is the same as itemId.
- fromLotNo
Optional. Holds the lot number of the item being transferred from the old location. Null indicates that it is the same as lotNo.
- fromSubLotNo
Optional. Holds the sublot number of the item being transferred from the old location. Null indicates that it is the same as subLotNo.
- fromGradeCd
Optional. Holds the grade code of the material being transferred from the old location. Null indicates that it is the same as gradeCd.
- fromStatusCd
Optional. Holds the status of the material being transferred from the old location. Null indicates that it is the same as statusCd.
- fromQtyTxd
Optional. Holds the quantity of the item transferred from the old location. Null indicates that it is the same as qtyTxd.
- fromUomId
Optional. Holds the unit of measure for the item quantity being transferred. Null indicates that it is the same as uomId.
- fromExpiryDate
Optional. Holds the inventory's expiry date and time at the source storage entity in the local time of that entity. Null indicates that it is the same date and time as the expiryDate value.
- fromSpare1
Optional. Holds the contents of the user-defined Spare1 field prior to the transfer.
- fromSpare2
Optional. Holds the contents of the user-defined Spare2 field prior to the transfer.
- fromSpare3
Optional. Holds the contents of the user-defined Spare3 field prior to the transfer.
- fromSpare4
Optional. Holds the contents of the user-defined Spare4 field prior to the transfer.
- fromSpare5
Optional. Holds the contents of the user-defined Spare5 field prior to the transfer.
- fromSpare6
Optional. Holds the contents of the user-defined Spare6 field prior to the transfer.
- qtyTxdErp
Optional. Holds the quantity of the item being transferred that is sent to an ERP system.
- goodsReceived
Optional. Holds a flag that, if set to true, specifies that the goods are received from the supplier. The default is false.
- goodsShipped
Optional. Holds a flag that, if set to true, specifies that the goods are shipped to the customer. The default is false.
- transferListRowId
Optional. Holds the ID of the transfer list record for which this row is a partial or complete fulfillment.
- comments
Optional. Holds the explanatory notes for this inventory transfer.
- modId
Output. Holds the modification ID assigned to this record when it is added. The modId parameter is used by other methods that modify or delete this type of record for optimistic concurrency control.
- transId
Output. Holds the returned ID of the item transfer.
Observe the following input parameter rules:
- Required non-DB* parameters: Must pass a value. Cannot be empty or null.
- Optional non-DB* parameters: Either enter a value or pass a null. If passing a null and a default value has been defined, the default value will be used for the parameter.
- Required DB* parameters: Must pass a value. To enter an empty value for the parameter, pass DB*.null (e.g., DBInt.null). Optional DB* parameters: To enter no value for the parameter, pass DB*.null (e.g., DBInt.null). To use the default value for the parameter if one has been defined for the object being added, pass a null.