M-Files API 22.6.11519.0
GetMFilesURLForObjectOrFile Method
VaultObjectOperations Object : GetMFilesURLForObjectOrFile Method
The ID of the object for which the URL is requested.
The target version of the specified object. Valid only if "SpecificVersion" is true.
Specifies whether to target a specific version of the object. If false, the generated URL points to the latest version. If true, "TargetVersion" must be provided.
The ID of the file for which the URL is requested. Specify -1 if the URL is requested for the object and not for a specific file of the object.
The type of the requested URL.
Description
Gets an M-Files URL for the specified object or file.
Syntax
Visual Basic
Public Function GetMFilesURLForObjectOrFile( _
   ByVal ObjID As ObjID, _
   Optional ByVal TargetVersion As Long = -1, _
   Optional ByVal SpecificVersion As Boolean = False, _
   Optional ByVal File As Long = -1, _
   Optional ByVal URLType As MFilesURLType = MFilesURLTypeShow _
) As String
Parameters
ObjID
The ID of the object for which the URL is requested.
TargetVersion
The target version of the specified object. Valid only if "SpecificVersion" is true.
SpecificVersion
Specifies whether to target a specific version of the object. If false, the generated URL points to the latest version. If true, "TargetVersion" must be provided.
File
The ID of the file for which the URL is requested. Specify -1 if the URL is requested for the object and not for a specific file of the object.
URLType
ValueDescription
MFilesURLTypeEditSpecifies an URL for performing the open-for-edit action for the target file.
MFilesURLTypeOpenSpecifies an URL for performing the default open action for the target file.
MFilesURLTypeShowSpecifies an URL for showing the object version. The URL does not open the target file.
MFilesURLTypeShowMetadataSpecifies an URL for showing the metadata card for the target object.
MFilesURLTypeViewSpecifies an URL for performing the read-only open action for the target file.
The type of the requested URL.
See Also

VaultObjectOperations Object  | VaultObjectOperations Members