dataStore.DeleteResult
The content in this help topic pertains to SuiteScript 2.1.
|
Object Description |
Contains the number of documents deleted. Returned by Collection.deleteOne(query) and Collection.deleteMany(query). |
|
Supported Script Types |
Server scripts |
|
Module |
|
|
Methods and Properties |
|
|
Since |
2026.2 |
DeleteResult Object Members
|
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
|---|---|---|---|---|
|
Property |
number |
Server scripts |
The number of documents deleted. |
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.deleteOne({ status: 'complete' });
const deletedCount = result.deletedCount;
...
// Add additional code