M-Files UI Extensibility Framework
OnCreateObject Event
M-Files UI Extensibility Framework > Events > OnCreateObject Event
Description
Triggered when the creation of a vault object is requested. This event occurs before the request is passed for M-Files Server.
Parameters

objectType : Long [ in ]

The object type id.

propertyValues : IPropertyValues [ in, out ]

The property values of the new object.

sourceObjectFiles : ISourceObjectFiles [ in, out ]

Files for the new object.

accessControlList : IAccessControlList [ in, out ]

The permissions set for the new object.

checkInRequested : Boolean [ in ]

True if the operation issuer requested server to create the object and check it in. Server may decide not to honour the request. In such case a separate check in operation (and event) follows automatically.

singleFileRequested : Boolean [ in ]

True if the operation expects exactly one file. The sourceObjectFiles collection must contain a single file.

Return Type

The return type can be one of the types as follows:

Object

Callback object to be activated after the operation. Callback methods:

OnSuccess Method [ optional ]

Called when the operation is successfully performed. The call receives parameters as follows:

objectVersion : IObjectVersion [ in ]

Object version of the new object.

OnError Method [ optional ]

Called when the operation failed. The call receives parameters as follows:

errorCode : Long [ in ]

The error code (HRESULT).

errorMessage : String [ in ]

The error message.

errorStack : String [ in ]

The call stack that identifies the error source in the program code.

Finally Method [ optional ]

Called after the operation was performed regardless of the operation success or failure.

Boolean

False to prevent the operation.

Null

Prevents the operation.

Remarks
       Supported in M-Files 9.0.3372.6 and newer.
See Also