Update Method (ItemClass)
- Last UpdatedNov 06, 2025
- 3 minute read
The Update() method updates all columns of the specified item class record in the Item_Class table.
'Declaration
Public Shared Sub Update( _
ByVal sessionId As Integer, _
ByVal itemClassId As String, _
ByVal itemClassDesc As String, _
ByVal produced As Boolean, _
ByVal consumed As Boolean, _
ByVal obsolete As Boolean, _
ByVal purchased As Boolean, _
ByVal sold As Boolean, _
ByVal lotNoFormat As DBString, _
ByVal lastLotNo As DBString, _
ByVal subLotNoFormat As DBString, _
ByVal lastSubLotNo As DBString, _
ByVal serialNoLvl As Integer, _
ByVal invUniqueByJob As Boolean, _
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 itemClassId As String
Dim itemClassDesc As String
Dim produced As Boolean
Dim consumed As Boolean
Dim obsolete As Boolean
Dim purchased As Boolean
Dim sold As Boolean
Dim lotNoFormat As DBString
Dim lastLotNo As DBString
Dim subLotNoFormat As DBString
Dim lastSubLotNo As DBString
Dim serialNoLvl As Integer
Dim invUniqueByJob As Boolean
Dim spare1 As DBString
Dim spare2 As DBString
Dim spare3 As DBString
Dim spare4 As DBString
Dim lastEditComment As DBString
Dim lastEditAt As Date
ItemClass.Update(sessionId, itemClassId, itemClassDesc, produced, consumed, obsolete, purchased, sold, lotNoFormat, lastLotNo, subLotNoFormat, lastSubLotNo, serialNoLvl, invUniqueByJob, spare1, spare2, spare3, spare4, lastEditComment, lastEditAt)
public static void Update(
int sessionId,
string itemClassId,
string itemClassDesc,
bool produced,
bool consumed,
bool obsolete,
bool purchased,
bool sold,
DBString lotNoFormat,
DBString lastLotNo,
DBString subLotNoFormat,
DBString lastSubLotNo,
int serialNoLvl,
bool invUniqueByJob,
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.
- itemClassId
- Required. Holds the ID of the item class.
- itemClassDesc
- Required. Holds the description of the item class.
- produced
- Required. Holds a flag that, if set to true, specifies that this item class can have produced items.
- consumed
- Required. Holds a flag that, if set to true, specifies that this item class can have consumed items.
- obsolete
- Required. Holds a flag that, if set to true, specifies that this item class can have obsolete items.
- purchased
- Required. Holds a flag that, if set to true, specifies that this item class can have purchased items.
- sold
- Required. Holds a flag that, if set to true, specifies that this item class can have sold items.
- lotNoFormat
- Optional. Holds the format of the lot number.
- lastLotNo
- Optional. Holds the last lot number that was used for an item in this class.
- subLotNoFormat
- Optional. Holds the format of the sublot number.
- lastSubLotNo
- Optional. Holds the last sublot number that was used for an item in this class.
- serialNoLvl
- Required. Holds the items based on the specified level.
- invUniqueByJob
- Required. Holds a flag that, if set to true, specifies that the class' items inventories are unique by job.
- 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
- Required. Holds comments that describe why this record is being updated.
- lastEditAt
Required. Holds the date/time when this record was added or last updated, for optimistic concurrency control. 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.