Update Method (ItemCons)
- Last UpdatedNov 06, 2025
- 4 minute read
The Update() method updates all columns of the specified item consumption record in the Item_Cons table.
'Declaration
Public Shared Sub Update( _
ByVal sessionId As Integer, _
ByVal rowId As Integer, _
ByVal woId As DBString, _
ByVal operId As DBString, _
ByVal seqNo As DBInt, _
ByVal shiftStartLocal As DBDateTime, _
ByVal itemId As String, _
ByVal lotNo As DBString, _
ByVal fgLotNo As DBString, _
ByVal subLotNo As DBString, _
ByVal fgSubLotNo As DBString, _
ByVal reasCd As DBInt, _
ByVal userId As String, _
ByVal itemScrapped As Boolean, _
ByVal entId As DBInt, _
ByVal shiftId As DBInt, _
ByVal gradeCd As Integer, _
ByVal statusCd As Integer, _
ByVal fromEntId As DBInt, _
ByVal qtyCons As Double, _
ByVal qtyConsErp As Double, _
ByVal extRef As DBString, _
ByVal transactionType As Integer, _
ByVal genealogyId As DBString, _
ByVal upstreamEventId As DBString, _
ByVal segmentRequirementId As DBString, _
ByVal segmentResponseId As DBString, _
ByVal comments As DBString, _
ByVal spare1 As DBString, _
ByVal spare2 As DBString, _
ByVal spare3 As DBString, _
ByVal spare4 As DBString, _
ByVal lastEditComment As DBString, _
ByRef lastEditAt As Date _
)
'Usage
Dim sessionId As Integer
Dim rowId As Integer
Dim woId As DBString
Dim operId As DBString
Dim seqNo As DBInt
Dim shiftStartLocal As DBDateTime
Dim itemId As String
Dim lotNo As DBString
Dim fgLotNo As DBString
Dim subLotNo As DBString
Dim fgSubLotNo As DBString
Dim reasCd As DBInt
Dim userId As String
Dim itemScrapped As Boolean
Dim entId As DBInt
Dim shiftId As DBInt
Dim gradeCd As Integer
Dim statusCd As Integer
Dim fromEntId As DBInt
Dim qtyCons As Double
Dim qtyConsErp As Double
Dim extRef As DBString
Dim transactionType As Integer
Dim genealogyId As DBString
Dim upstreamEventId As DBString
Dim segmentRequirementId As DBString
Dim segmentResponseId As DBString
Dim comments As DBString
Dim spare1 As DBString
Dim spare2 As DBString
Dim spare3 As DBString
Dim spare4 As DBString
Dim lastEditComment As DBString
Dim lastEditAt As Date
ItemCons.Update(sessionId, rowId, woId, operId, seqNo, shiftStartLocal, itemId, lotNo, fgLotNo, subLotNo, fgSubLotNo, reasCd, userId, itemScrapped, entId, shiftId, gradeCd, statusCd, fromEntId, qtyCons, qtyConsErp, extRef, transactionType, genealogyId, upstreamEventId, segmentRequirementId, segmentResponseId, comments, spare1, spare2, spare3, spare4, lastEditComment, lastEditAt)
public static void Update(
int sessionId,
int rowId,
DBString woId,
DBString operId,
DBInt seqNo,
DBDateTime shiftStartLocal,
string itemId,
DBString lotNo,
DBString fgLotNo,
DBString subLotNo,
DBString fgSubLotNo,
DBInt reasCd,
string userId,
bool itemScrapped,
DBInt entId,
DBInt shiftId,
int gradeCd,
int statusCd,
DBInt fromEntId,
double qtyCons,
double qtyConsErp,
DBString extRef,
int transactionType,
DBString genealogyId,
DBString upstreamEventId,
DBString segmentRequirementId,
DBString segmentResponseId,
DBString comments,
DBString spare1,
DBString spare2,
DBString spare3,
DBString spare4,
DBString lastEditComment,
ref 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 consumption record.
- woId
- Required. Holds the work order ID for identifying the job that consumed the item.
- operId
- Required. Holds the operation ID for identifying the job that consumed the item.
- seqNo
- Required. Holds the operation sequence number for identifying the job that consumed the item.
- shiftStartLocal
- Required. Holds the start time of the shift during which the item was consumed, in the local time of the entity at which the consumption occurred.
- itemId
- Required. Holds the ID of the consumed item.
- lotNo
- Required. Holds the lot number of the consumed item.
- fgLotNo
- Required. Holds the lot number of finished goods for which the item was consumed.
- subLotNo
- Required. Holds the sublot number of the consumed item.
- fgSubLotNo
- Required. Holds the sublot number of finished goods for which the item was consumed.
- reasCd
- Required. Holds a reason code that uniquely identifies grade + status of goods consumed.
- userId
- Required. Holds the ID of the user who ran the job that consumed the item.
- itemScrapped
- Required. Holds a flag that specifies whether the item is designated as scrapped.
- entId
- Required. Holds the ID of the entity on which the job that consumed the item is running.
- shiftId
- Required. Holds the ID of the shift during which the item was consumed.
- gradeCd
- Required. Holds the grade code of the consumed goods.
- statusCd
- Required. Holds the status code of the consumed goods.
- fromEntId
- Required. Holds the ID of the storage entity from which the consumed item was moved.
- qtyCons
- Required. Holds the quantity consumed.
- qtyConsErp
- Required. Holds the quantity consumed value that was sent to an ERP system.
- extRef
- Required. Holds the reference to the external system for defect tracking or any other purpose.
- transactionType
Required. Holds an enumeration that indicates the transaction type.
0 = normal
1 = lot split
2 = combination
- genealogyId
- Required. Holds a genealogy ID.
- upstreamEventId
- Required. Holds the ID of an upstream event.
- segmentRequirementId
- Required. Holds a segment requirement ID.
- segmentResponseId
- Required. Holds a segment response ID.
- comments
- Required. Holds comments about the consumed item.
- 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.
- 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.