UpdateSpecific(Int32,Int32,String,String,Nullable<Int32>,Nullable<DateTime>,Nullable<DateTime>,String,DBString,DBString,DBString,DBString,Nullable<Int32>,String,Nullable<Int32>,Nullable<Int32>,Nullable<Int32>,Nullable<Int32>,DBInt,Nullable<Boolean>,Nullable<Double>,Nullable<Double>,Nullable<Int32>,Nullable<Boolean>,DBString,Nullable<Int32>,DBString,DBString,DBString,DBString,DBString,DBString,DBString,DBString,DBString,DBString,Nullable<DateTime>) Method
- Last UpdatedNov 06, 2025
- 6 minute read
The UpdateSpecific() method updates selected columns of the specified item production record in the Item_Prod table.
This overload of the method includes the shiftStart, hourStart, and shiftId parameters. It does not include the createdAtUtc parameter.
'Declaration
Public Overloads Shared Sub UpdateSpecific( _
ByVal sessionId As Integer, _
ByVal rowId As Integer, _
ByVal woId As String, _
ByVal operId As String, _
ByVal seqNo As Nullable(Of Integer), _
ByVal shiftStart As Nullable(Of Date), _
ByVal hourStart As Nullable(Of Date), _
ByVal itemId As String, _
ByVal lotNo As DBString, _
ByVal rmLotNo As DBString, _
ByVal subLotNo As DBString, _
ByVal rmSubLotNo As DBString, _
ByVal reasCd As Nullable(Of Integer), _
ByVal userId As String, _
ByVal entId As Nullable(Of Integer), _
ByVal shiftId As Nullable(Of Integer), _
ByVal gradeCd As Nullable(Of Integer), _
ByVal statusCd As Nullable(Of Integer), _
ByVal toEntId As DBInt, _
ByVal goodProd As Nullable(Of Boolean), _
ByVal qtyProd As Nullable(Of Double), _
ByVal qtyProdErp As Nullable(Of Double), _
ByVal processedFlag As Nullable(Of Integer), _
ByVal byproduct As Nullable(Of Boolean), _
ByVal extRef As DBString, _
ByVal moveStatus As Nullable(Of Integer), _
ByVal genealogyId As DBString, _
ByVal eventId 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 Nullable(Of Date) _
)
'Usage
Dim sessionId As Integer
Dim rowId As Integer
Dim woId As String
Dim operId As String
Dim seqNo As Nullable(Of Integer)
Dim shiftStart As Nullable(Of Date)
Dim hourStart As Nullable(Of Date)
Dim itemId As String
Dim lotNo As DBString
Dim rmLotNo As DBString
Dim subLotNo As DBString
Dim rmSubLotNo As DBString
Dim reasCd As Nullable(Of Integer)
Dim userId As String
Dim entId As Nullable(Of Integer)
Dim shiftId As Nullable(Of Integer)
Dim gradeCd As Nullable(Of Integer)
Dim statusCd As Nullable(Of Integer)
Dim toEntId As DBInt
Dim goodProd As Nullable(Of Boolean)
Dim qtyProd As Nullable(Of Double)
Dim qtyProdErp As Nullable(Of Double)
Dim processedFlag As Nullable(Of Integer)
Dim byproduct As Nullable(Of Boolean)
Dim extRef As DBString
Dim moveStatus As Nullable(Of Integer)
Dim genealogyId As DBString
Dim eventId 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 Nullable(Of Date)
ItemProd.UpdateSpecific(sessionId, rowId, woId, operId, seqNo, shiftStart, hourStart, itemId, lotNo, rmLotNo, subLotNo, rmSubLotNo, reasCd, userId, entId, shiftId, gradeCd, statusCd, toEntId, goodProd, qtyProd, qtyProdErp, processedFlag, byproduct, extRef, moveStatus, genealogyId, eventId, segmentRequirementId, segmentResponseId, comments, spare1, spare2, spare3, spare4, lastEditComment, lastEditAt)
public static void UpdateSpecific(
int sessionId,
int rowId,
string woId,
string operId,
Nullable<int> seqNo,
Nullable<DateTime> shiftStart,
Nullable<DateTime> hourStart,
string itemId,
DBString lotNo,
DBString rmLotNo,
DBString subLotNo,
DBString rmSubLotNo,
Nullable<int> reasCd,
string userId,
Nullable<int> entId,
Nullable<int> shiftId,
Nullable<int> gradeCd,
Nullable<int> statusCd,
DBInt toEntId,
Nullable<bool> goodProd,
Nullable<double> qtyProd,
Nullable<double> qtyProdErp,
Nullable<int> processedFlag,
Nullable<bool> byproduct,
DBString extRef,
Nullable<int> moveStatus,
DBString genealogyId,
DBString eventId,
DBString segmentRequirementId,
DBString segmentResponseId,
DBString comments,
DBString spare1,
DBString spare2,
DBString spare3,
DBString spare4,
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 production record to be updated.
- woId
- Optional. Holds the work order ID for identifying the job that produced the item.
- operId
- Optional. Holds the operation ID for identifying the job that produced the item.
- seqNo
- Optional. Holds the operation sequence number for identifying the job that produced the item.
- shiftStart
- Optional. Holds the start time of the shift during which an item was produced.
- hourStart
- Optional filter parameter. Holds the start time hour at which production occurred.
- itemId
- Optional. Holds the item ID.
- lotNo
- Optional. Holds the lot number to which the item belongs.
- rmLotNo
- Optional. Holds the lot number of the raw material from which the lot/sublot was produced.
- subLotNo
- Optional. Holds the sublot number to which the item belongs.
- rmSubLotNo
- Optional. Holds the sublot number of the raw material from which the lot/sublot was produced.
- reasCd
- Optional. Holds a reason code that uniquely identifies grade + status of goods produced
- userId
- Optional. Holds the ID of the user who ran the job that produced the item.
- entId
- Optional. Holds the ID of th entity on which the job that produced the item is running.
- shiftId
- Optional. Holds the ID of the shift during which the item was produced.
- gradeCd
- Optional. Holds the grade code of a produced item.
- statusCd
- Optional. Holds the status code of a produced item.
- toEntId
- Optional. Holds the ID of the storage entity to which the produced item was moved.
- goodProd
- Optional. Holds a flag that, if set to true, specifies that the item is designated as good production.
- qtyProd
- Optional. Holds the quantity produced.
- qtyProdErp
- Optional. Holds the quantity produced value that has been reported to an ERP system.
- processedFlag
- Optional. Holds a flag that, if set to true, specifies that the item was processed.
- byproduct
- Optional. Holds a flag that, if set to true, specifies that the item is a by-product.
- extRef
- Optional. Holds the reference to the external system for defect tracking or any other purpose.
- moveStatus
Optional. Holds an integer that indicates whether the lot been moved to the next operation.
0=not moved to the next operation
1=moved to the next operation
- genealogyId
- Optional. Holds the genealogy ID.
- eventId
- Optional. Holds the event ID.
- segmentRequirementId
- Optional. Holds the segment requirement ID.
- segmentResponseId
- Optional. Holds the segment response ID.
- comments
- Optional. Holds comments about the produced item.
- 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.
- 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 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.
- 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.
Note that if a changed value for any of the following record columns is supplied, the value must pass business rule validation before the record column is updated:
- wo_id
- oper_id
- seq_no
- shift_start_utc
- shift_start_local
- hour_start_utc
- hour_start_local
- item_id
- lot_no
- rm_lot_no
- sublot_no
- rm_sublot_no
- reas_cd
- user_id
- ent_id
- shift_id
- grade_cd
- status_cd
- to_ent_id
- good_prod
- qty_prod
- processed_flag
- byproduct
- ext_ref
- move_status
For example, say an existing Item_Prod record with the row_id of 14 has a qty_prod 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_Prod table is unique, from the business rules perspective the combination of ent_id + item_id + lot_no + sublot_no must be unique for an production row. So the production row is validated as to whether a quantity exists for Lot20221201. If no quantity exists for Lot20221201, then the qty_prod value will be deleted from the original production row and a new production row with Lot20221201 as the lot_no value and 20 as the qty_prod value will be created.