Update(Int32,Int32,Int32,String,DBString,DBString,DBInt,DBInt,Double,Double,DBInt,DateTime,DBDateTime,DBDateTime,DBString,DBString,DBInt,DBString,DBString,DBString,DBString,DBString,DBString,DBString,Nullable<DateTime>) Method
- Last UpdatedNov 06, 2025
- 4 minute read
The Update() method updates all columns of the specified item inventory record in the Item_Inv table.
For this overload of the method, the inventory record date input parameters are passed in the local time of the storage entity. This overload also includes the lastEditComment input parameter.
'Declaration
Public Overloads Shared Sub Update( _
ByVal sessionId As Integer, _
ByVal rowId As Integer, _
ByVal entId As Integer, _
ByVal itemId As String, _
ByVal lotNo As DBString, _
ByVal subLotNo As DBString, _
ByVal gradeCd As DBInt, _
ByVal statusCd As DBInt, _
ByVal qtyLeft As Double, _
ByVal qtyLeftErp As Double, _
ByVal uomId As DBInt, _
ByVal dateInLocal As Date, _
ByVal dateOutLocal As DBDateTime, _
ByVal expiryDate As DBDateTime, _
ByVal woId As DBString, _
ByVal operId As DBString, _
ByVal seqNo As DBInt, _
ByVal spare1 As DBString, _
ByVal spare2 As DBString, _
ByVal spare3 As DBString, _
ByVal spare4 As DBString, _
ByVal spare5 As DBString, _
ByVal spare6 As DBString, _
ByVal lastEditComment As DBString, _
ByRef lastEditAt As Nullable(Of Date) _
)
'Usage
Dim sessionId As Integer
Dim rowId As Integer
Dim entId As Integer
Dim itemId As String
Dim lotNo As DBString
Dim subLotNo As DBString
Dim gradeCd As DBInt
Dim statusCd As DBInt
Dim qtyLeft As Double
Dim qtyLeftErp As Double
Dim uomId As DBInt
Dim dateInLocal As Date
Dim dateOutLocal As DBDateTime
Dim expiryDate As DBDateTime
Dim woId As DBString
Dim operId As DBString
Dim seqNo As DBInt
Dim spare1 As DBString
Dim spare2 As DBString
Dim spare3 As DBString
Dim spare4 As DBString
Dim spare5 As DBString
Dim spare6 As DBString
Dim lastEditComment As DBString
Dim lastEditAt As Nullable(Of Date)
ItemInv.Update(sessionId, rowId, entId, itemId, lotNo, subLotNo, gradeCd, statusCd, qtyLeft, qtyLeftErp, uomId, dateInLocal, dateOutLocal, expiryDate, woId, operId, seqNo, spare1, spare2, spare3, spare4, spare5, spare6, lastEditComment, lastEditAt)
public static void Update(
int sessionId,
int rowId,
int entId,
string itemId,
DBString lotNo,
DBString subLotNo,
DBInt gradeCd,
DBInt statusCd,
double qtyLeft,
double qtyLeftErp,
DBInt uomId,
DateTime dateInLocal,
DBDateTime dateOutLocal,
DBDateTime expiryDate,
DBString woId,
DBString operId,
DBInt seqNo,
DBString spare1,
DBString spare2,
DBString spare3,
DBString spare4,
DBString spare5,
DBString spare6,
DBString lastEditComment,
ref Nullable<DateTime> lastEditAt
)
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.
- entId
Required. Holds the ID of the entity.
- itemId
Required. Holds the ID of the item.
- lotNo
Required. Holds the lot number of the item.
- subLotNo
Required. Holds an sublot number of the item.
- gradeCd
Required. Holds the grade code of the item. Set to null if it should default to the grade code of the lot or sublot.
- statusCd
Required. Holds the status code of the item. Set to null if it should default to the status code of the lot or sublot.
- qtyLeft
Required. Holds the quantity that is remaining in the entity.
- qtyLeftErp
Required. Holds the quantity that is remaining in the entity, as last transmitted to an ERP system. The default is 0.
- uomId
Required. Holds the ID of the unit of measure that is used for the item in the inventory record if the inventory UOM is different than its native UOM. If null, then the UOM in the inventory record is the item's native UOM.
- dateInLocal
Required. Holds the date when the items were last received to this lot or location in the local time of the storage entity.
- dateOutLocal
Required. Holds the date when the items were last sent from this lot or location in the local time of the storage entity.
- expiryDate
Required. Holds the item's expiry date and time in the local time of the storage entity.
- woId
Required. Holds the ID of the work order for the last job that produced these goods.
- operId
Optional. Holds the ID of the operation for the last job that produced these goods.
- seqNo
Optional. Holds the operation sequence number for the last job that produced these goods.
- spare1
Required. Holds the contents of the user-defined spare1 field.
- spare2
Required. Holds the contents of the user-defined spare2 field.
- spare3
Required. Holds the contents of the user-defined spare3 field.
- spare4
Required. Holds the contents of the user-defined spare4 field.
- spare5
Required. Holds the contents of the user-defined spare5 field.
- spare6
Required. Holds the contents of the user-defined spare6 field.
- lastEditComment
Required. Holds comments that describe why this record is being updated.
- lastEditAt
Optional. Holds the date/time when this record was added or last updated, for optimistic concurrency control. If it is specified, the passed value must match the lastEditAt value in the record for the update to succeed.
Output. Holds the date/time value when the record was updated by this called method.