Aaron McCausland
06/25/2025, 11:09 PMdefine(["N/runtime", "N/search", "N/dataset", "N/record"], function(runtime, search, dataset, record){
When executing the line
const datasetObj = dataset.loadDataset({id: datasetId});
I get this error:
TypeError: dataset.loadDataset is not a function
But the NetSuite Help documentation shows this:
dataset.loadDataset(options)
Method Description
Loads an existing dataset.
Returns
dataset.Dataset
Supported Script Types
Server scripts
For more information, see SuiteScript 2.x Script Types.
Governance
10 units
Module
N/dataset Module
Sibling Module Members
N/dataset Module Members
Since
2020.2
Parameters
Note The options
parameter is a JavaScript object.
Parameter
Type
Required / Optional
Description
options.id
string
required
The ID of the dataset to load.
So why is a function the docs say is there, not there?
I'm going to use query.load() instead. That doesn't throw errors and seems to return all the dataset results into the map functionAnthony OConnor
06/25/2025, 11:15 PMAnthony OConnor
06/25/2025, 11:16 PMAaron McCausland
06/25/2025, 11:19 PMAnthony OConnor
06/25/2025, 11:27 PMKomal Kumar
06/26/2025, 11:02 AMAaron McCausland
07/01/2025, 9:32 PM