VerifyInventoryProperties(Int32,Int32,Nullable<Int32>,String,String,String,Nullable<Int32>,Nullable<Int32>,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.
For this overload of the method, the entity is identified by its entity ID, and the item grade and status are identified by their codes.
'Declaration
Public Overloads Shared Sub VerifyInventoryProperties( _
ByVal sessionId As Integer, _
ByVal sourceInventoryRowId As Integer, _
ByVal entId As Nullable(Of Integer), _
ByVal itemId As String, _
ByVal lotNo As String, _
ByVal subLotNo As String, _
ByVal gradeCd As Nullable(Of Integer), _
ByVal statusCd As Nullable(Of Integer), _
ByVal expiryDate As Nullable(Of Date), _
ByRef invPropsAreIdentical As Boolean, _
ByRef invPropsDifferInfo As String _
)
'Usage
Dim sessionId As Integer
Dim sourceInventoryRowId As Integer
Dim entId As Nullable(Of Integer)
Dim itemId As String
Dim lotNo As String
Dim subLotNo As String
Dim gradeCd As Nullable(Of Integer)
Dim statusCd As Nullable(Of Integer)
Dim expiryDate As Nullable(Of Date)
Dim invPropsAreIdentical As Boolean
Dim invPropsDifferInfo As String
StorageExec.VerifyInventoryProperties(sessionId, sourceInventoryRowId, entId, itemId, lotNo, subLotNo, gradeCd, statusCd, expiryDate, invPropsAreIdentical, invPropsDifferInfo)
public static void VerifyInventoryProperties(
int sessionId,
int sourceInventoryRowId,
Nullable<int> entId,
string itemId,
string lotNo,
string subLotNo,
Nullable<int> gradeCd,
Nullable<int> statusCd,
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.
- entId
- Optional. Holds the ID of the the destination 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.
- gradeCd
- Optional. Holds the grade code of a 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.
- statusCd
- Optional. Holds the status code of a 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.
- expiryDate
- Optional. Holds the inventory's expiry date and time in the local time of the destination storage entity. Defaults to the expiry date and time of the item at its 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 of an item in the source inventory location has the same grade, status, and expiry date 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 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.