dataStore.getDatastore(id)
The content in this help topic pertains to SuiteScript 2.1.
|
Method Description |
Returns a dataStore.Datastore object for the specified data store in the executing script's storage scope. Use Datastore.getCollection(id) to access a collection within this data store. This method doesn't read or write stored documents. |
|
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 data store to access. Use 1-64 ASCII letters, digits, underscores, dots, or hyphens. Data store identifiers are case-insensitive. |
2026.2 |
Errors
|
Error Code |
Error Message |
Thrown If |
|---|---|---|
|
|
The datastore 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 store = dataStore.getDatastore('processing');
...
// Add additional code