SystemDocument - Scoped, Global
-
- UpdatedJan 30, 2025
- 5 minutes to read
- Yokohama
- API reference
The SystemDocument API provides methods for setting fields of a record in the Documents [ds_document] 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, use the DocumentService API.
SystemDocument - SystemDocument(String docName)
Instantiates a SystemDocument object.
Name | Type | Description |
---|---|---|
docName | String | Name of the document. |
Type | Description |
---|---|
None |
Example
The following example shows how to instantiate a SystemDocument object and set several fields for a document record. See also DocumentService API.
SystemDocument - audience(String audience)
Sets the Audience field of a document record to specify external or internal availability. Represents the Audience field in a Document Management form.
Name | Type | Description |
---|---|---|
audience | String | String representing the intended audience of the document. Possible
values:
|
Type | Description |
---|---|
None |
Example
The following example shows how to set the Audience field in a new document record. See also DocumentService - Scoped, Global.
SystemDocument - classification(String classification)
Sets the Classification field of a document record to identify the level of information sensitivity. Represents the Classification field in a Document Management form.
Name | Type | Description |
---|---|---|
classification | String | Classification of the document. Possible values:
|
Type | Description |
---|---|
String | The value of the classification property of a SystemDocument object. |
Example
The following example shows how to set the classification field in a new document record. See also DocumentService API.
SystemDocument - createdFromTemplate(String docTemplate)
Sets the template from which to generate a document. When the document is generated, the specified template is listed in the Created From Template field in the Documents [ds_document_list] table.
Name | Type | Description |
---|---|---|
docTemplate | String | Sys_id of a document listed in the Documents [ds_document_list] table. The document must have the Template checkbox selected (true). See also DocumentVersionService API. |
Type | Description |
---|---|
None |
Example
The following example shows how to create a new document record from an existing template. See also DocumentService API.
SystemDocument - department(String docDept)
Sets the Department field of a document record.
Name | Type | Description |
---|---|---|
docDept | String | Sys_id of a department listed in the Departments [cmn_department] table. |
Type | Description |
---|---|
None |
Example
The following example shows how to set the department field in a new document record. See also DocumentService API.
SystemDocument - description(String description)
Sets the Description field of a document record.
Name | Type | Description |
---|---|---|
description | String | Description of the document. |
Type | Description |
---|---|
None |
Example
The following example shows how to set the description field in a document record. See also: DocumentService API.
SystemDocument - name(String docName)
Sets the Name field of a document record.
Name | Type | Description |
---|---|---|
docName | String | Name of the document. |
Type | Description |
---|---|
None |
Example
The following example shows how to set the Name field in a new document record. See also DocumentService API.
SystemDocument - owner(String owner)
Sets the Owner field of a document record.
Name | Type | Description |
---|---|---|
owner | String | Sys_id of a user listed in the Users [sys_user] table. Role required: admin Default: Current user |
Type | Description |
---|---|
None |
Example
The following example shows how to set the owner field in a new document record. See also DocumentService API.
SystemDocument - reviewers(String reviewers)
Sets the Reviewers field of a document record.
Name | Type | Description |
---|---|---|
reviewers | String | List of one or more document reviewers by sys_id. The reviewer must be a user listed in the Users [sys_user] table. |
Type | Description |
---|---|
None |
Example
The following example shows how to set the reviewers field in a new document record. See also DocumentService API.
SystemDocument - state(String state)
Sets the State field of a document record.
Name | Type | Description |
---|---|---|
state | String | State of the document representing where the document is in the
workflow. Valid values:
|
Type | Description |
---|---|
None |
Example
The following example shows how to set the state field in a new document record. See also DocumentService API.
SystemDocument - template(Boolean template)
Specifies whether a document record is a template.
Name | Type | Description |
---|---|---|
template | Boolean | Flag that specifies whether a document record is a template. Valid values:
Default: false |
Type | Description |
---|---|
None |
Example
The following example shows how to indicate that a document record is a template. See also DocumentService API.
SystemDocument - type(String docType)
Sets the Type field of a document record.
Name | Type | Description |
---|---|---|
docType | String | Type of document. Valid values:
|
Type | Description |
---|---|
None |
Example
The following example shows how to set the type field in a new document record. See also DocumentService API.
On this page
- SystemDocument - SystemDocument(String docName)
- SystemDocument - audience(String audience)
- SystemDocument - classification(String classification)
- SystemDocument - createdFromTemplate(String docTemplate)
- SystemDocument - department(String docDept)
- SystemDocument - description(String description)
- SystemDocument - name(String docName)
- SystemDocument - owner(String owner)
- SystemDocument - reviewers(String reviewers)
- SystemDocument - state(String state)
- SystemDocument - template(Boolean template)
- SystemDocument - type(String docType)