VerifyInventoryProperties(Int32,Int32[],Nullable<Int32>,String,String,String,Nullable<Int32>,Nullable<Int32>,Nullable<DateTime>,Boolean,String) Method
- Last UpdatedMar 17, 2026
- 4 minute read
The VerifyInventoryProperties() method verifies that the inventory properties, such as grade code, status code, and expiry date and time, of an item from a source inventory location has the same values as an item in the destination inventory location.
This overload of the method:
- Passes a list of one or more source inventory records, as an array, to be compared to the destination inventory (itemList parameter)
- Identifies the destination storage entity by its entity ID
- Identifies the item grade and status by their codes
- Uses the local time of the destination storage entity for the inventory expiry date and time (toExpirationDate parameter)
'Declaration
Public Overloads Shared Sub VerifyInventoryProperties( _
ByVal sessionId As Integer, _
ByVal itemList() As Integer, _
ByVal toEntId As Nullable(Of Integer), _
ByVal toItemId As String, _
ByVal toLotNo As String, _
ByVal toSubLotNo As String, _
ByVal toGradeCd As Nullable(Of Integer), _
ByVal toStatusCd As Nullable(Of Integer), _
ByVal toExpirationDate As Nullable(Of Date), _
ByRef invPropsAreIdentical As Boolean, _
ByRef invPropsDifferInfo As String _
)
'Usage
Dim sessionId As Integer
Dim itemList() As Integer
Dim toEntId As Nullable(Of Integer)
Dim toItemId As String
Dim toLotNo As String
Dim toSubLotNo As String
Dim toGradeCd As Nullable(Of Integer)
Dim toStatusCd As Nullable(Of Integer)
Dim toExpirationDate As Nullable(Of Date)
Dim invPropsAreIdentical As Boolean
Dim invPropsDifferInfo As String
StorageExec.VerifyInventoryProperties(sessionId, itemList, toEntId, toItemId, toLotNo, toSubLotNo, toGradeCd, toStatusCd, toExpirationDate, invPropsAreIdentical, invPropsDifferInfo)
public static void VerifyInventoryProperties(
int sessionId,
int[] itemList,
Nullable<int> toEntId,
string toItemId,
string toLotNo,
string toSubLotNo,
Nullable<int> toGradeCd,
Nullable<int> toStatusCd,
Nullable<DateTime> toExpirationDate,
out bool invPropsAreIdentical,
out string invPropsDifferInfo
)
Parameters
- sessionId
- Optional. Holds the session ID and thus the user who is making this method call.
- itemList
- Required. Holds an array of row_id values from the Item_Inv table.
- toEntId
- Optional. Holds the ID of the destination entity.
- toItemId
- Optional. Holds the ID of the destination item. Defaults to an item from the source inventory location.
- toLotNo
- Optional. Holds the lot number of the destination item. Defaults to a lot number from the source inventory location.
- toSubLotNo
- Optional. Holds the sublot number of the destination item. Defaults to a sublot number from the source inventory location.
- toGradeCd
- Optional. Holds the grade code of the destination item. Defaults to the grade code from the source inventory location only when the destination inventory location is not found or does not exist.
- toStatusCd
- Optional. Holds the status code of the destination item. Defaults to the status code from the source inventory location only when the destination inventory location is not found or does not exist.
- toExpirationDate
- Optional. Holds the expiry date and time of the inventory in the local time of the destination storage entity. Defaults to the expiry date and time from the source inventory location only when the destination inventory location is not found or does not exist. Note that the expiry date and time is not calculated based on the item's lifetime value.
- invPropsAreIdentical
- Output. Holds a returned flag that identifies whether or not the grade, status, and expiry date and time for the source item match those of the destination item.
- invPropsDifferInfo
- Output. Holds the returned information about the mismatch between the source inventory properties and the destination inventory properties.
To not include an optional parameter, pass a null.
This method loops through each source location in the supplied itemList array and verifies that the grade code, status code, and expiry date and time of the item in the source inventory location has the values as the item in the destination inventory location. After extracting each source inventory location, this method verifies the single inventory location against the destination inventory location. If any of these properties between source inventory location and the destination inventory location differ, then the InventoryPropertiesAreIdentical flag is set to false, and the reason that these properties differ is returned via the InvPropsDifferInfo parameter. Otherwise, this flag is set to true, and an empty string is returned via the InvPropsDifferInfo parameter.
If the inventory stored in the source entity and the destination entity are configured to be indistinguishable (Storage_Exec.indistinguishable_lots is set to true), then each item whose quantities are greater than 0 for a lot and sublot from the sourced inventory location must match those of the lot and sublot in the destination inventory location. If not, and if the grade, status, and expiry date and time differ between the source and destination inventory locations, the method will fail.
In either of the cases above, if the destination inventory row storage location does not exist, but the source does, the method will not fail because of these conditions.
In addition, all of the following conditions must be true for the method to succeed:
- The following supplied fields must contain a non-null and non-empty value and must exist in the database: source inventory row ID, destination entity, and destination item.
- A unique storage location can be identified. That is, ent_id, item_id, lot_no, and sublot_no should be unique if this item.inv_unique_by_job is set to false. Otherwise, ent_id, item_id, lot_no, sublot_no, wo_id, oper_id, and seq_no should be unique. No more than one storage location (see condition above) is identified.
- The identified source inventory location exists in the database.
- The following fields exist in the database: destination entity, destination item status, destination grade.
- The supplied destination entity is capable of storing items in the inventory, thus the ent.can_store property for this entity is currently set to true.
- Both the source and the destination storage location is configured to be indistinguishable.