query.listTables(options)

Note:

The content in this help topic pertains to SuiteScript 2.0.

Method Description

Lists the table view objects that are included in a workbook in SuiteAnalytics Workbook.

This method returns an array of Objects. Each Object represents a table view and includes the following properties with associated values:

  • name — The name of the table view object

  • scriptId — The script ID of the table view object

Returns

Array<Object>

Supported Script Types

Client and server scripts

For more information, see SuiteScript 2.x Script Types.

Governance

None

Module

N/query Module

Sibling Module Members

N/query Module Members

Since

2020.1

Parameters

Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

options.workbookId

string

required

The ID of the workbook containing the table view objects to list.

Errors

Error Code

Thrown If

MISSING_REQD_ARGUMENT

A required parameter is missing.

SCRIPT_ID_OF_WORKBOOK_IS_REQUIRED

The specified workbook ID represents an analytical record that is not a workbook.

SSS_INVALID_SCRIPT_ID_1

The specified workbook ID is not valid.

WRONG_PARAMETER_TYPE

The specified workbook ID is not a string.

Syntax

Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/query Module Script Samples.

            // Add additional code
...
var tables = query.listTables({ workbookId: 'custworkbook237'
});
...
// Add additional code 

          

Related Topics

N/query Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices