UpdateSpecific(Int32,Int32,Nullable<Int32>,String,DBString,DBString,DBInt,DBInt,Nullable<Double>,Nullable<Double>,DBInt,Nullable<DateTime>,DBDateTime,DBDateTime,DBString,DBString,DBInt,DBString,DBString,DBString,DBString,DBString,DBString,DBString,Nullable<DateTime>) Method
- Last UpdatedNov 06, 2025
- 5 minute read
The UpdateSpecific() method updates selected 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 UpdateSpecific( _
ByVal sessionId As Integer, _
ByVal rowId As Integer, _
ByVal entId As Nullable(Of Integer), _
ByVal itemId As String, _
ByVal lotNo As DBString, _
ByVal subLotNo As DBString, _
ByVal gradeCd As DBInt, _
ByVal statusCd As DBInt, _
ByVal qtyLeft As Nullable(Of Double), _
ByVal qtyLeftErp As Nullable(Of Double), _
ByVal uomId As DBInt, _
ByVal dateInLocal As Nullable(Of 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 Nullable(Of Integer)
Dim itemId As String
Dim lotNo As DBString
Dim subLotNo As DBString
Dim gradeCd As DBInt
Dim statusCd As DBInt
Dim qtyLeft As Nullable(Of Double)
Dim qtyLeftErp As Nullable(Of Double)
Dim uomId As DBInt
Dim dateInLocal As Nullable(Of 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.UpdateSpecific(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 UpdateSpecific(
int sessionId,
int rowId,
Nullable<int> entId,
string itemId,
DBString lotNo,
DBString subLotNo,
DBInt gradeCd,
DBInt statusCd,
Nullable<double> qtyLeft,
Nullable<double> qtyLeftErp,
DBInt uomId,
Nullable<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 row ID of the item inventory record that is being updated.
- entId
Optional. Holds the ID of the entity.
- itemId
Optional. Holds the ID of the item.
- lotNo
Optional. Holds the lot number of the item.
- subLotNo
Optional. Holds the sublot number of the item.
- gradeCd
Optional. Holds the grade code of the item. Set to null if it should default to the grade code of the lot or sublot.
- statusCd
Optional. Holds the status code of the item. Set to null if it should default to the status code of the lot or sublot.
- qtyLeft
Optional. Holds the quantity that is remaining in the entity.
- qtyLeftErp
Optional. Holds the quantity that is remaining in the entity, as last transmitted to an ERP system. The default is 0.
- uomId
Optional. 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
Optional. Holds the date when the items were last received to this lot or location in the local time of the storage entity.
- dateOutLocal
Optional. Holds the date when the items were last sent from this lot or location in the local time of the storage entity.
- expiryDate
Optional. Holds the item's expiry date and time in the local time of the storage entity.
- woId
Optional. 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
Optional. Holds the contents of the user-defined spare1 field.
- spare2
Optional. Holds the contents of the user-defined spare2 field.
- spare3
Optional. Holds the contents of the user-defined spare3 field.
- spare4
Optional. Holds the contents of the user-defined spare4 field.
- spare5
Optional. Holds the contents of the user-defined spare5 field.
- spare6
Optional. Holds the contents of the user-defined spare6 field.
- lastEditComment
Optional. 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.
Observe the following 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.
Note that if a value is supplied for any of the columns listed below, a business rule validation is performed on that row against all the columns listed below.
- ent_id
- item_id
- lot_no
- sublot_no
- grade_cd
- status_cd
- qty_left
- uom_id
- wo_id
- oper_id
- seq_no
For example, say an existing Item_Inv record with the row_id 14 has a qty_left value of 20 and a lot_no of Lot20220923. An UpdateSpecific call to this row supplies the value Lot20221201 for the lot_no column but no other optional input parameters are passed. Although the row_id in the Item_Inv table is unique, from the business rules perspective the combination of ent_id + item_id + lot_no + sublot_no must be unique for an inventory row. So the inventory row is validated as to whether a quantity exists for Lot20221201. If no quantity exists for Lot20221201, then the qty_left value will be deleted from the original inventory row and a new inventory row with Lot20221201 as the lot_no value and 20 as the qty_left value will be created.