VerifyInventoryProperties(Int32,Int32,String,String,String,String,String,String,String,Nullable<DateTime>,Boolean,String) Method
- Last UpdatedNov 06, 2025
- 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 single source inventory record, identified by its row ID in the Item_Inv table (sourceInventoryRowId parameter), to compare to the destination inventory
- Identifies the destination storage entity by its entity and site names
- Identifies the item grade and status by their descriptions
- Uses the local time of the destination storage entity for the inventory expiry date and time (expiryDate parameter)
'Declaration
Public Overloads Shared Sub VerifyInventoryProperties( _
ByVal sessionId As Integer, _
ByVal sourceInventoryRowId As Integer, _
ByVal entName As String, _
ByVal siteName As String, _
ByVal itemId As String, _
ByVal lotNo As String, _
ByVal subLotNo As String, _
ByVal itemGradeDesc As String, _
ByVal itemStatusDesc As String, _
ByVal expiryDate As Nullable(Of Date), _
ByRef invPropsAreIdentical As Boolean, _
ByRef invPropsDifferInfo As String _
)
'Usage
Dim sessionId As Integer
Dim sourceInventoryRowId As Integer
Dim entName As String
Dim siteName As String
Dim itemId As String
Dim lotNo As String
Dim subLotNo As String
Dim itemGradeDesc As String
Dim itemStatusDesc As String
Dim expiryDate As Nullable(Of Date)
Dim invPropsAreIdentical As Boolean
Dim invPropsDifferInfo As String
StorageExec.VerifyInventoryProperties(sessionId, sourceInventoryRowId, entName, siteName, itemId, lotNo, subLotNo, itemGradeDesc, itemStatusDesc, expiryDate, invPropsAreIdentical, invPropsDifferInfo)
public static void VerifyInventoryProperties(
int sessionId,
int sourceInventoryRowId,
string entName,
string siteName,
string itemId,
string lotNo,
string subLotNo,
string itemGradeDesc,
string itemStatusDesc,
Nullable<DateTime> expiryDate,
out bool invPropsAreIdentical,
out string invPropsDifferInfo
)
Parameters
- sessionId
- Optional. Holds the session ID and thus the user who is making this method call.
- sourceInventoryRowId
- Required. Holds the row ID of the source inventory location record in the Item_Inv table.
- entName
- Optional. Holds the name of the destination storage entity.
- siteName
- Optional. Holds the site name of the destination storage entity.
- itemId
- Optional. Holds the ID of the destination item. Defaults to an item from the source inventory location.
- lotNo
- Optional. Holds the lot number of the destination item. Defaults to a lot number from the source inventory location.
- subLotNo
- Optional. Holds the sublot number of the destination item. Defaults to a sublot number from the source inventory location.
- itemGradeDesc
- Optional. Holds the grade description of a destination item. Defaults to the grade description from the source inventory location only when the destination inventory location is not found or does not exist.
- itemStatusDesc
- Optional. Holds the status description of a destination item. Defaults to the status description from the source inventory location only when the destination inventory location is not found or does not exist.
- expiryDate
- 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 verifies the inventory properties grade code, status code, and expiry date and time of an item in the source inventory location has the same grade, status, and expiry date and time of an item in 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.