SystemDocumentListEntry - Scoped, Global
The SystemDocumentListEntry API provides methods for setting the record fields in the Document List Entries [ds_document_list_entry] 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.
- SystemDocument – Define a document object.
- DocumentService – Add, update, or delete a document.
- SystemDocumentVersion – Define a document version.
- DocumentVersionService – Add, update, or delete a document version.
- SystemDocumentList – Define a document list.
- DocumentListService – Add, update, or delete a document list.
SystemDocumentListEntry - SystemDocumentListEntry(String listID)
Instantiates a SystemDocumentListEntry object.
| Name | Type | Description |
|---|---|---|
| listSysId | String | Sys_id of a document list record in the Document Lists [ds_document_lists] table. |
| Type | Description |
|---|---|
| None |
The following example shows how to instantiate a SystemDocumentListEntry object.
var docList = new sn_doc_services.SystemDocumentListEntry("<docListSysId>");
SystemDocumentListEntry - description(String description)
Sets the Description field of a document list entry record.
| Name | Type | Description |
|---|---|---|
| description | String | Description of the document list entry. |
| Type | Description |
|---|---|
| None |
The following example shows how to add a description to the document list entry provided using the constructor. See also DocumentListEntryService API.
var docListEntry = new sn_doc_services.SystemDocumentListEntry('21afddea2460fc10f877a6fed1c2b0dd');
docListEntry.description('birth');
var dlEntrySvc = new sn_doc_services.DocumentListEntryService();
gs.info(JSON.stringify(dlEntrySvc.createDocumentListEntry(docListEntry), null, 2));
{
"message": "Create List Entry , List Entry sysId : d3f0b13624e8fc10f877a6fed1c2b0d9is successful.",
"request_id": "d3f0b13624e8fc10f877a6fed1c2b0d9",
"status": "success"
}SystemDocumentListEntry - document(String docSysId)
Specifies the document template to add to a document list.
- Define the document object setting the SystemDocument – template() method to true. Create or update the document record with the methods in the DocumentService API.
- Select the Template check box of a document in the Documents [ds_document] table.
- SystemDocumentVersion – Define a document version.
- DocumentVersionService – Add, update, or delete a document version.
| Name | Type | Description |
|---|---|---|
| docSysId | String | Sys_id of a document record in the Documents [ds_document] table. The document specified must be a template and have a version. |
| Type | Description |
|---|---|
| None |
The following example shows how to add a document template as a document list entry. See also DocumentListEntryService API.
var docListEntry = new sn_doc_services.SystemDocumentListEntry('21afddea2460fc10f877a6fed1c2b0dd');
docListEntry.document("9acd7fea24587410f877a6fed1c2b060");
docListEntry.description('birth certificate');
var dlEntrySvc = new sn_doc_services.DocumentListEntryService();
gs.info(JSON.stringify(dlEntrySvc.createDocumentListEntry(docListEntry), null, 2));
{
"message": "Create List Entry , List Entry sysId : d3f0b13624e8fc10f877a6fed1c2b0d9is successful.",
"request_id": "d3f0b13624e8fc10f877a6fed1c2b0d9",
"status": "success"
}SystemDocumentListEntry - documentList(String listSysId)
Specifies the document list in which to add a document.
- SystemDocumentList – Define a document list.
- DocumentListService – Add, update, or delete a document list.
| Name | Type | Description |
|---|---|---|
| listSysId | String | Sys_id of a document list record in the Document Lists [ds_document_lists] table. |
| Type | Description |
|---|---|
| None |
The following example shows how to set the document list in which to add a document. See also DocumentListEntryService API.
var docListEntry = new sn_doc_services.SystemDocumentListEntry();
docListEntry.documentList('21afddea2460fc10f877a6fed1c2b0dd');
docListEntry.document('deaef1ce24103410f877a6fed1c2b085');
docListEntry.description('passport');
var dlEntrySvc = new sn_doc_services.DocumentListEntryService();
gs.info(JSON.stringify(dlEntrySvc.createDocumentListEntry(docListEntry), null, 2));
{
"message": "Create List Entry , List Entry sysId : c4ccaa8b24283050f877a6fed1c2b003is successful.",
"request_id": "c4ccaa8b24283050f877a6fed1c2b003",
"status": "success"
}