Add Method (Folder)
- Last UpdatedNov 06, 2025
- 2 minute read
The Add() method adds a new folder record in the Folder table.
'Declaration
Public Shared Sub Add( _
ByVal sessionId As Integer, _
ByVal itemId As String, _
ByVal operId As String, _
ByVal entId As Integer, _
ByVal verId As String, _
ByVal operDesc As String, _
ByVal notes As String, _
ByVal udf1 As String, _
ByVal udf2 As String, _
ByVal preferredVer As Boolean, _
ByVal designHold As Boolean, _
ByRef lastEditAt As Date _
)
'Usage
Dim sessionId As Integer
Dim itemId As String
Dim operId As String
Dim entId As Integer
Dim verId As String
Dim operDesc As String
Dim notes As String
Dim udf1 As String
Dim udf2 As String
Dim preferredVer As Boolean
Dim designHold As Boolean
Dim lastEditAt As Date
Folder.Add(sessionId, itemId, operId, entId, verId, operDesc, notes, udf1, udf2, preferredVer, designHold, lastEditAt)
public static void Add(
int sessionId,
string itemId,
string operId,
int entId,
string verId,
string operDesc,
string notes,
string udf1,
string udf2,
bool preferredVer,
bool designHold,
out 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 associated with the folder.
- operId
- Required. Holds the ID of the operation associated with the folder.
- entId
- Required. Holds the ID of the entity associated with the folder.
- verId
- Required. Holds the folder version.
- operDesc
- Optional. Holds the description of the operation associated with the folder.
- notes
- Optional. Holds notes about the folder.
- udf1
- Optional. Holds the contents of the user-defined field 1 of the folder.
- udf2
- Optional. Holds the contents of the user-defined field 2 of the folder.
- preferredVer
- Required. Holds the flag that indicates whether this version of the folder is the preferred version. The preferred version will be available to MES Operator users when no folder is specifically assigned to a job.
- designHold
A Boolean that is a flag that indicates whether this folder is on a design hold.
Note: This parameter is currently not used by the system.
- lastEditAt
- Output. Holds the returned datetime 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.