Clone Method (BomVersion)
- Last UpdatedNov 06, 2025
- 2 minute read
The Clone() method adds a new BOM version record to the Bom_Ver table by making a copy of an existing record. This method is similar to the Copy() method. However, this method also updates the BOM_Item_Oper_Link records if the existingParentItemId parameter value equals the newParentItemId parameter value.
'Declaration
Public Shared Sub Clone( _
ByVal sessionId As Integer, _
ByVal existingParentItemId As String, _
ByVal existingVerId As String, _
ByVal newParentItemId As String, _
ByVal newVerId As String, _
ByVal newVerComments As DBString, _
ByRef modId As String _
)
'Usage
Dim sessionId As Integer
Dim existingParentItemId As String
Dim existingVerId As String
Dim newParentItemId As String
Dim newVerId As String
Dim newVerComments As DBString
Dim modId As String
BomVersion.Clone(sessionId, existingParentItemId, existingVerId, newParentItemId, newVerId, newVerComments, modId)
public static void Clone(
int sessionId,
string existingParentItemId,
string existingVerId,
string newParentItemId,
string newVerId,
DBString newVerComments,
out string modId
)
Parameters
- sessionId
Required. Holds the session ID and thus the user who is making this method call.
- existingParentItemId
Required. Holds the ID of the existing parent item whose BOM version is to be cloned.
- existingVerId
Required. Holds the ID of the existing BOM version to be cloned.
- newParentItemId
Required. Holds the ID of the parent item of the new BOM version.
- newVerId
Required. Holds the version ID of the new BOM version.
- newVerComments
Optional. Holds comments about the new BOM version.
- modId
Output. Holds the modification ID assigned to this record when it is added. The modId parameter is used by other methods that update 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.