Using NetSuite’s Internal remoteObject.bridgeCall API to Load Dataset Definitions

When working with NetSuite Analytics Datasets (Workbooks), it’s often necessary to retrieve the underlying dataset schema—fields, joins, aggregations, types, and metadata. NetSuite does not expose a public REST API for this; however, its internal client-side API allows you to load dataset definitions using the remoteObject.bridgeCall method.

The getDatasetObject() function below demonstrates how to call this internal API safely and correctly.

How It Works

The function sends a POST request to NetSuite’s internal bridge endpoint to load the dataset structure using the command:

["queryApiBridge", "loadSearch", [datasetId]]

NetSuite processes this via its internal remote object and returns the dataset definition normally used by the Workbook UI.

Key Steps

  1. Generate the endpoint URL
  2. Uses generateEndPoint() to point to NetSuite’s internal API gateway.
  3. This endpoint is normally used by SuiteAnalytics Workbook.
  4. Build the bridge call payload
  5. The call uses:
  • jrid = "0"
  • jrmethod = "remoteObject.bridgeCall"
  • jrparams = JSON array specifying the bridge function and dataset ID.
  1. Use FormData (not JSON / URL params)
  2. NetSuite expects a multipart form request.
  3. No manual Content-Type header is added because FormData handles boundaries automatically.
  4. Send POST request with credentials
  5. credentials: "include" ensures session cookies are sent, allowing the internal API to authenticate the user context.
  6. Parse and return the dataset definition
  7. The response includes a .result.result property containing the full dataset metadata.

What You Get

The returned "datasetDefinition" includes:

  • All dataset fields
  • Field types and relationships
  • Joins and sources
  • Data source metadata
  • Filters and query configuration

This is the same data the Workbook UI uses when rendering dataset fields.

Leave a comment

Your email address will not be published. Required fields are marked *