M-Files API 22.6.11519.0
CreateNewObjectEx Method
VaultObjectOperations Object : CreateNewObjectEx Method
The object type for the new object as the object type ID number.
The collection of the property values for the new object.
The collection of the source files for the new object.
If this parameter is True, the new object is created as a single-file document.
If this parameter is True, the new object should be checked in immediately.

The access control list for the new object.

In scripting languages, a specific null value (e.g., Nothing in VBScript) should be used to indicate the default value.

Description
Creates a new object based on the specified properties and source files.
Syntax
Visual Basic
Public Function CreateNewObjectEx( _
   ByVal ObjectType As Long, _
   ByVal Properties As PropertyValues, _
   Optional ByVal SourceFiles As SourceObjectFiles = 0, _
   Optional ByVal SFD As Boolean = False, _
   Optional ByVal CheckIn As Boolean = True, _
   Optional ByVal AccessControlList As AccessControlList = 0 _
) As ObjectVersionAndProperties
Parameters
ObjectType
The object type for the new object as the object type ID number.
Properties
The collection of the property values for the new object.
SourceFiles
The collection of the source files for the new object.
SFD
If this parameter is True, the new object is created as a single-file document.
CheckIn
If this parameter is True, the new object should be checked in immediately.
AccessControlList

The access control list for the new object.

In scripting languages, a specific null value (e.g., Nothing in VBScript) should be used to indicate the default value.

Remarks

At a minimum, the property values collection needs to contain property values and other required property definitions for the object class.

In the current implementation this method is not fully transactional. For example, if the source file(s) cannot be uploaded the newly created object is left checked out and cannot be found from the M-Files UI.

See Also

VaultObjectOperations Object  | VaultObjectOperations Members  | CreateNewObject Method