dataStore.getCollection(id)
The content in this help topic pertains to SuiteScript 2.1.
|
Method Description |
Returns a dataStore.Collection object for the specified collection in the This is equivalent to calling |
|
Returns |
|
|
Supported Script Types |
Server scripts |
|
Governance |
None |
|
Module |
|
|
Sibling Module Members |
|
|
Since |
2026.2 |
Parameters
|
Parameter |
Type |
Required / Optional |
Description |
Since |
|---|---|---|---|---|
|
|
string |
required |
The identifier of the collection to access. Use 1-64 ASCII letters, digits, underscores, dots, or hyphens. Collection identifiers are case-insensitive. |
2026.2 |
Errors
|
Error Code |
Error Message |
Thrown If |
|---|---|---|
|
|
The collection identifier must be a string with 1 to 64 ASCII letters, digits, underscores, dots, or hyphens. |
The identifier isn't a string or doesn't meet the identifier rules. |
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');
...
// Add additional code