StorageExec Constructor(Int32,String,Int32,Double,Int32,Double,Int32,Boolean,Boolean,String,Boolean,Boolean,Boolean,Int32,Boolean,Boolean,Boolean,Boolean,Int32,Int32,Int32,Int32,String,String,String,String,String,String,DateTime)
- Last UpdatedNov 06, 2025
- 4 minute read
The StorageExec() method is the constructor for the StorageExec class. It creates a StorageExec object.
This overload of the method initializes all fields by passing input parameters in the method call.
'Declaration
Public Function New( _
ByVal entId As Integer, _
ByVal storageType As String, _
ByVal status As Integer, _
ByVal maxCapacity As Double, _
ByVal uomId As Integer, _
ByVal tare As Double, _
ByVal tareUomId As Integer, _
ByVal autoDelZeroInv As Boolean, _
ByVal allowNegQty As Boolean, _
ByVal scannableId As String, _
ByVal allowMultipleItems As Boolean, _
ByVal allowMultipleLots As Boolean, _
ByVal movable As Boolean, _
ByVal storageEntId As Integer, _
ByVal allowDirtyState As Boolean, _
ByVal logStateTransitions As Boolean, _
ByVal indistinguishableLots As Boolean, _
ByVal unlisted As Boolean, _
ByVal spareInt1 As Integer, _
ByVal spareInt2 As Integer, _
ByVal spareInt3 As Integer, _
ByVal spareInt4 As Integer, _
ByVal spare1 As String, _
ByVal spare2 As String, _
ByVal spare3 As String, _
ByVal spare4 As String, _
ByVal lastEditComment As String, _
ByVal lastEditBy As String, _
ByVal lastEditAt As Date _
)
'Usage
Dim entId As Integer
Dim storageType As String
Dim status As Integer
Dim maxCapacity As Double
Dim uomId As Integer
Dim tare As Double
Dim tareUomId As Integer
Dim autoDelZeroInv As Boolean
Dim allowNegQty As Boolean
Dim scannableId As String
Dim allowMultipleItems As Boolean
Dim allowMultipleLots As Boolean
Dim movable As Boolean
Dim storageEntId As Integer
Dim allowDirtyState As Boolean
Dim logStateTransitions As Boolean
Dim indistinguishableLots As Boolean
Dim unlisted As Boolean
Dim spareInt1 As Integer
Dim spareInt2 As Integer
Dim spareInt3 As Integer
Dim spareInt4 As Integer
Dim spare1 As String
Dim spare2 As String
Dim spare3 As String
Dim spare4 As String
Dim lastEditComment As String
Dim lastEditBy As String
Dim lastEditAt As Date
Dim instance As New StorageExec(entId, storageType, status, maxCapacity, uomId, tare, tareUomId, autoDelZeroInv, allowNegQty, scannableId, allowMultipleItems, allowMultipleLots, movable, storageEntId, allowDirtyState, logStateTransitions, indistinguishableLots, unlisted, spareInt1, spareInt2, spareInt3, spareInt4, spare1, spare2, spare3, spare4, lastEditComment, lastEditBy, lastEditAt)
public StorageExec(
int entId,
string storageType,
int status,
double maxCapacity,
int uomId,
double tare,
int tareUomId,
bool autoDelZeroInv,
bool allowNegQty,
string scannableId,
bool allowMultipleItems,
bool allowMultipleLots,
bool movable,
int storageEntId,
bool allowDirtyState,
bool logStateTransitions,
bool indistinguishableLots,
bool unlisted,
int spareInt1,
int spareInt2,
int spareInt3,
int spareInt4,
string spare1,
string spare2,
string spare3,
string spare4,
string lastEditComment,
string lastEditBy,
DateTime lastEditAt
)
Parameters
- entId
- Required. Holds the ID of an entity that can store material.
- storageType
- Required. Holds a user-defined string used for sorting.
- status
- Required. Holds the status of the storage entity.
- maxCapacity
- Required. Holds the maximum storage capacity.
- uomId
- Required. Holds the ID of the unit of measure for the maxCapacity parameter.
- tare
- Required. Holds the weight of the entity when empty.
- tareUomId
- Required. Holds the unit of measure for the tare weight.
- autoDelZeroInv
- Required. Holds a flag that, if set to true, specifies that the row from the Item_Inventory table be deleted when the quantity left is less than or equal to zero.
- allowNegQty
- Required. Holds a flag that, if set to true, specifies that negative quantity left values be allowed.
- scannableId
- Required. Holds a flag that, if set to true, specifies that a bar code scan can be used to uniquely identify the entity.
- allowMultipleItems
- Required. Holds a flag that, if set to true, specifies that different items can be stored within this storage entity.
- allowMultipleLots
- Required. Holds a flag that, if set to true, specifies that different lot numbers can be stored within this entity.
- movable
- Required. Holds a flag that, if set to true, specifies that this storage entity is movable.
- storageEntId
- Required. Holds another entity where this storage entity is currently located (only used when this storage entity is movable).
- allowDirtyState
- Required. Holds a flag that, if set to true, specifies that the Dirty state (status = 2) is available for this storage entity.
- logStateTransitions
- Required. Holds a flag that, if set to true, specifies that state transitions are logged for this entity.
- indistinguishableLots
- Required. Holds a flag that, if set to true, specifies that inventory stored in this entity cannot be separated by lot number when consumed, shipped, or transferred out.
- unlisted
- Required. Holds a flag that, if set to true, specifies that this entity will not show up in certain trees and lists of storage entities.
- spareInt1
- Required. Holds the contents of the user-defined spare1 integer field.
- spareInt2
- Required. Holds the contents of the user-defined spare2 integer field.
- spareInt3
- Required. Holds the contents of the user-defined spare3 integer field.
- spareInt4
- Required. Holds the contents of the user-defined spare4 integer field.
- spare1
- Required. Holds the contents of the user-defined spare1 string field.
- spare2
- Required. Holds the contents of the user-defined spare2 string field.
- spare3
- Required. Holds the contents of the user-defined spare3 string field.
- spare4
- Required. Holds the contents of the user-defined spare4 string field.
- lastEditComment
- Optional. Holds comments that describes why this record is being added.
- lastEditBy
- Optional. Holds the user who added this record.
- lastEditAt
- Output. Holds the returned date/time when this record was added. The lastEditAt parameter is used by other methods that modify or delete this type of record for optimistic concurrency control.
Observe the following input parameter rules:
- Required non-DB* parameters: Must pass a value. Cannot be empty or null.
- 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.
- Required DB* parameters: Must pass a value. To enter an empty value for the parameter, pass DB*.null (e.g., DBInt.null).
- 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.