dataStore.Document
The content in this help topic pertains to SuiteScript 2.1.
|
Object Description |
A JSON object representing a stored document. Each stored document includes a generated
When constructing documents to insert, consider the following:
The normalized JSON document body, including property names and values, must not exceed 10 MB (10,485,760 bytes). This limit excludes the generated |
|
Supported Script Types |
Server scripts |
|
Module |
|
|
Methods and Properties |
|
|
Since |
2026.2 |
Document Object Members
|
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
|---|---|---|---|---|
|
Property |
string |
Server scripts |
The system-generated document identifier. |
Syntax
The following code sample shows the syntax for this member. It isn't a functional example. For a complete script example, see N/dataStore Module Script Samples.
// Add additional code
...
const collection = dataStore.getCollection('checkpoints');
const result = await collection.findOne({ status: 'pending' });
if (result.document !== null) {
const document = result.document;
const documentId = document._id;
const status = document.status;
}
...
// Add additional code