SystemDocumentVersion - Scoped, Global
-
- UpdatedJan 30, 2025
- 2 minutes to read
- Yokohama
- API reference
The SystemDocumentVersion API provides methods for setting the values of a document's source version in the Versions [ds_document_version] table.
This API requires the Document Management
plugin (com.snc.platform_document_management) and is provided within the
sn_doc_services
namespace. For information, see Document Services.
To create a document version, use the DocumentVersionService API.
SystemDocumentVersion - SystemDocumentVersion(String docSysId)
Instantiates a SystemDocumentVersion object.
Name | Type | Description |
---|---|---|
docSysId | String | Sys_id of a document record in the Documents [ds_document] table. |
Type | Description |
---|---|
None |
Example
The following example shows how to instantiate a SystemDocumentVersion object and create a document version. See also DocumentVersionService.
Output:
SystemDocumentVersion - document(String docSysId)
Specifies the document record for this version.
Name | Type | Description |
---|---|---|
docSysId | String | Sys_id of a document record in the Documents [ds_document] table. |
Type | Description |
---|---|
None |
Example
The following example shows how to set the name field of a document version. See also DocumentVersionService – createDocumentVersion().
SystemDocumentVersion - type(String docType)
Sets the Type field of a document version.
Name | Type | Description |
---|---|---|
docType | String | Document source type. Valid values:
Note: An attachment can currently only be added in the
Document Versions [ds_document_version] table UI and not with the
API. |
Type | Description |
---|---|
None |
Example
The following example shows how to set the type field and create a document version. See also DocumentVersionService.
SystemDocumentVersion - url(String url)
Sets the URL of a document version.
Name | Type | Description |
---|---|---|
url | String | URL of the source document for this version. |
Type | Description |
---|---|
None |
Example
The following example shows how to set the URL field as the source of a document version. See also DocumentVersionService.
SystemDocumentVersion - versionNumber(Number versionNumber)
Sets the number of a document version.
Name | Type | Description |
---|---|---|
versionNumber | Number | Version number for this document. |
Type | Description |
---|---|
None |
Example
The following example shows how to set the version number and create a document version. See also DocumentVersionService.