GetLatestObjectVersion
Gets the latest document version of the given document.
Syntax
// Assumes shellUI has been initialized with IShellUI instance
const results = await shellUI.Vault.ObjectOperations.GetLatestObjectVersion({
obj_id: {
type: 0,
item_id: {
internal_id: 0,
external_repository_id: {
connection: "<!< The external repository connection identifier.>",
item: "<item>",
},
},
},
allow_checked_out: false,
});
Message
| Name | Description | Type |
|---|---|---|
obj_id | The object ID. | ObjID |
allow_checked_out | True if a checked-out document version can be returned if the document is currently checked out to this user. Note that even if this parameter is true, the method never returns a version that is checked out to some other user. | bool |
Return type
| Name | Description | Type |
|---|---|---|
object_version | The latest document version ID. It can be a checked-out version only if the current user has this document checked out. | ObjVerVersion |
version_guid | The GUID of the document version. | string |
Example
{
"object_version": {
"type": 7 /* Enum: ObjVerVersionType */,
"internal_version": 0,
"external_repository_version": "<external_repository_version>",
"external_repository_sort_key": 0
},
"version_guid": "<!< The GUID of the document version.>"
}