dataStore.FindResult
The content in this help topic pertains to SuiteScript 2.1.
|
Object Description |
Contains a matching document and its metadata. Returned for each matching document when you iterate through the dataStore.Cursor from Collection.find(query). Both properties are read-only. When there are no document matches, the cursor returns no results. |
|
Supported Script Types |
Server scripts |
|
Module |
|
|
Methods and Properties |
|
|
Since |
2026.2 |
FindResult Object Members
|
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
|---|---|---|---|---|
|
Property |
Server scripts |
The document that matches the query. |
||
|
Property |
Server scripts |
The matching document's metadata. |
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 cursor = await collection.find({ status: 'pending' });
for await (const result of cursor) {
const document = result.document;
const metadata = result.metadata;
}
...
// Add additional code