UpdateSpecific Method (Item)
- Last UpdatedNov 06, 2025
- 5 minute read
The UpdateSpecific() method updates selected columns of the specified item record in the Item table.
'Declaration
Public Shared Sub UpdateSpecific( _
ByVal sessionId As Integer, _
ByVal itemId As String, _
ByVal itemDesc As String, _
ByVal itemClassId As String, _
ByVal uomId As Nullable(Of Integer), _
ByVal template As Nullable(Of Boolean), _
ByVal lifetime As DBInt, _
ByVal unitCost As DBDouble, _
ByVal obsolete As Nullable(Of Boolean), _
ByVal purchased As Nullable(Of Boolean), _
ByVal sold As Nullable(Of Boolean), _
ByVal numDecimals As Nullable(Of Integer), _
ByVal mustCompleteSteps As Nullable(Of Boolean), _
ByVal mustProdReqdQty As Nullable(Of Boolean), _
ByVal minGrade As DBInt, _
ByVal minState As DBInt, _
ByVal minInvLevel As DBDouble, _
ByVal reOrderAmt As DBDouble, _
ByVal autoReOrder As Nullable(Of Boolean), _
ByVal lotNoFormat As DBString, _
ByVal lastLotNo As DBString, _
ByVal maxLotSize As DBDouble, _
ByVal subLotNoFormat As DBString, _
ByVal lastSubLotNo As DBString, _
ByVal serialNoLvl As Nullable(Of Integer), _
ByVal maxSubLotSize As DBDouble, _
ByVal maxOrderSize As DBDouble, _
ByVal minTraceInv As DBDouble, _
ByVal invUniqueByJob As Nullable(Of Boolean), _
ByVal notes 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 itemId As String
Dim itemDesc As String
Dim itemClassId As String
Dim uomId As Nullable(Of Integer)
Dim template As Nullable(Of Boolean)
Dim lifetime As DBInt
Dim unitCost As DBDouble
Dim obsolete As Nullable(Of Boolean)
Dim purchased As Nullable(Of Boolean)
Dim sold As Nullable(Of Boolean)
Dim numDecimals As Nullable(Of Integer)
Dim mustCompleteSteps As Nullable(Of Boolean)
Dim mustProdReqdQty As Nullable(Of Boolean)
Dim minGrade As DBInt
Dim minState As DBInt
Dim minInvLevel As DBDouble
Dim reOrderAmt As DBDouble
Dim autoReOrder As Nullable(Of Boolean)
Dim lotNoFormat As DBString
Dim lastLotNo As DBString
Dim maxLotSize As DBDouble
Dim subLotNoFormat As DBString
Dim lastSubLotNo As DBString
Dim serialNoLvl As Nullable(Of Integer)
Dim maxSubLotSize As DBDouble
Dim maxOrderSize As DBDouble
Dim minTraceInv As DBDouble
Dim invUniqueByJob As Nullable(Of Boolean)
Dim notes 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
Item.UpdateSpecific(sessionId, itemId, itemDesc, itemClassId, uomId, template, lifetime, unitCost, obsolete, purchased, sold, numDecimals, mustCompleteSteps, mustProdReqdQty, minGrade, minState, minInvLevel, reOrderAmt, autoReOrder, lotNoFormat, lastLotNo, maxLotSize, subLotNoFormat, lastSubLotNo, serialNoLvl, maxSubLotSize, maxOrderSize, minTraceInv, invUniqueByJob, notes, spare1, spare2, spare3, spare4, lastEditComment, lastEditAt)
public static void UpdateSpecific(
int sessionId,
string itemId,
string itemDesc,
string itemClassId,
Nullable<int> uomId,
Nullable<bool> template,
DBInt lifetime,
DBDouble unitCost,
Nullable<bool> obsolete,
Nullable<bool> purchased,
Nullable<bool> sold,
Nullable<int> numDecimals,
Nullable<bool> mustCompleteSteps,
Nullable<bool> mustProdReqdQty,
DBInt minGrade,
DBInt minState,
DBDouble minInvLevel,
DBDouble reOrderAmt,
Nullable<bool> autoReOrder,
DBString lotNoFormat,
DBString lastLotNo,
DBDouble maxLotSize,
DBString subLotNoFormat,
DBString lastSubLotNo,
Nullable<int> serialNoLvl,
DBDouble maxSubLotSize,
DBDouble maxOrderSize,
DBDouble minTraceInv,
Nullable<bool> invUniqueByJob,
DBString notes,
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.
- itemId
- Required. Holds the ID of the item.
- itemDesc
- Optional. Holds the description of the item.
- itemClassId
- Optional. Holds the ID of the item class.
- uomId
- Optional. Holds the ID of the unit of measure for the item.
- template
- Optional. Holds a flag that, if set to true, indicates that the item is a template to be copied, not an actual item.
- lifetime
- Optional. Holds the number of days that is the lifetime of the item, from manufacture to expiry.
- unitCost
- Optional. Holds the unit cost of the item.
- obsolete
- Optional. Holds a flag that specifies whether the returned DataSet should include obsolete items. If set to true, then items that are both obsolete and not obsolete classes are included in the DataSet. If set to false or null, only items that are not obsolete are included in the DataSet.
- purchased
- Optional. Holds a flag that, if set to true, specifies that the item is purchased.
- sold
- Optional. Holds a flag that, if set to true, specifies that the item is sold.
- numDecimals
- Required. Holds the number of decimal places to use when specifying a quantity of the item.
- mustCompleteSteps
- Optional. Holds a flag that, if set to true, indicates that the item can complete steps.
- mustProdReqdQty
- Optional. Holds a flag that, if set to true, specifies that this item can produce the required quantity.
- minGrade
- Optional. Holds the lowest shippable grade.
- minState
- Optional. Holds the lowest shippable state.
- minInvLevel
- Optional. Holds the overall amount of this item in the inventory below which a replenishment order should be generated.
- reOrderAmt
- Optional. Holds the minimum replenishment order amount.
- autoReOrder
- Optional. Holds a flag that, if set to true, specifies that the replenishment order be generated automatically.
- lotNoFormat
- Optional. Holds the format of the lot number.
- lastLotNo
- Optional. Holds the last lot number that was used for the item.
- maxLotSize
- Optional. Holds the item's maximum lot size.
- subLotNoFormat
- Optional. Holds the format of the sublot number.
- lastSubLotNo
- Optional. Holds the last sublot number that was used for the item.
- serialNoLvl
- Required. Holds a value that determines what level represents a serial number for this item: < 0, not a serialized item 0, lot number > 0, sublot number.
- maxSubLotSize
- Optional. Holds the item's maximum sublot size.
- maxOrderSize
- Optional. Holds the maximum quantity that can be specified in a work order for the item.
- minTraceInv
- Optional. Holds the minimum traceable inventory for the item.
- invUniqueByJob
- Optional. Holds a flag that, if set to true, specifies that the item's inventory is unique by job.
- notes
- Optional. Holds notes about the items.
- 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
Required. 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.