---
schema_version: "1"
id: 1f9a9cfefb935b91d06acf2d00d1f1a1890f8e7d3aa198075c2683f4b058873c
title: Tableau JavaScript API Concepts--What's New
collection: tableau
version: current
locale: en-us
portal_url: https://docs.salesforce.com/tableau/current/en-us/api/js_api/JavaScriptAPI/js_api_whats_new.md
canonical_url: https://help.tableau.com/current/api/js_api/en-us/JavaScriptAPI/js_api_whats_new.htm
source_site: help.tableau.com
content_type: documentation
content_hash: ee9cab6498b2ab91aabdd9fb18a50bcaa1cb7e27f7a00d5852a1baf0cdf391e8
description: Important changes for the Tableau JavaScript API
---
[Skip to main content](#main-content)

# What's New in the JavaScript API

**Important changes for the Tableau JavaScript API**

As of February 2024, the Tableau JavaScript API is deprecated. Use the Embedding API v3 instead for embedding interactive views into web pages and applications. For guidance on embedding Tableau views, see the [Tableau Embedding API v3 Help](https://help.tableau.com/current/api/embedding_api/en-us/index.html).

## Changes in the JavaScript API for Tableau 2022.1

This section lists the changes that were made for the version of the JavaScript API that ships with Tableau 2022.1.  
JavaScript API version: `tableau-2.9.1.min.js`.

- Bug fixes.

## Changes in the JavaScript API for Tableau 2021.4

This section lists the changes that were made for the version of the JavaScript API that ships with Tableau 2021.4.  
JavaScript API version: `tableau-2.9.0.min.js`.  

- Bug fixes.
- Added the `AppendContextMenuAsync`, `RemoveContextMenuAsync`, and `ExecuteContextMenuAsync` methods and `ContextMenuOptions` to support adding custom commands to the Uber tooltip (the tooltip that appears when marks are selected).
- Added a new event type (`CustomMarkContextMenuEvent`) that is raised when a custom context menu item is selected. You can provide a _CustomMarkContextMenuEventHandler_ to handle the event and trigger the custom action.

## Changes in the JavaScript API for Tableau 2021.3

This section lists the changes that were made for the version of the JavaScript API that ships with Tableau 2021.3.  
JavaScript API version: `tableau-2.8.3.min.js`.

Fixed a defect that could cause an error message to appear when applying an Ask Data Lens (`Uncaught TypeError: bn.handleVizListening` is not a function" and `Uncaught TypeError: bn.handleVizLoad`.

## Changes in the JavaScript API for Tableau 2021.2

This section lists the changes that were made for the version of the JavaScript API that ships with Tableau 2021.2.  
JavaScript API version: `tableau-2.8.2.min.js`.

Bug fixes.  

## Changes in the JavaScript API for Tableau 2021.1

This section lists the changes that were made for the version of the JavaScript API that ships with Tableau 2021.1.  
JavaScript API version: `tableau-2.8.0.min.js`.

You can now open the Download dialog box using the `viz.showDownloadDialog` method. For an example, see the [Export](https://help.tableau.com/current/api/js_api/en-us/JavaScriptAPI/js_api_sample_export_to_pdf.htm) sample.

## Changes in the JavaScript API for Tableau 2020.4

This section lists the changes that were made for the version of the JavaScript API that ships with Tableau 2020.4.  
JavaScript API version: `tableau-2.7.0.min.js`.

You can now apply filters to dashboards, in addition to worksheets. To support dashboard filtering, the JavaScript API provides the following new methods: `Dashboard.applyFilterAsync`, `Dashboard.getFiltersAsync`, `Filter.getAppliedWorksheetsAsync`, `Filter.setAppliedWorksheetsAsync`.

## Changes in the JavaScript API for Tableau 2020.3

This section lists the changes that were made for the version of the JavaScript API that ships with Tableau 2020.3.  
JavaScript API version: `tableau-2.6.0.min.js`.

- To support the ability to export the crosstab data from a worksheet directly to Excel, the JavaScript API added the `exportCrossTabToExcel` method. This method performs the same function as the **Worksheet > Export > Crosstab to Excel** operation in Tableau. The method generates the `.xlsx` file and downloads it to your default location.

- The `applyRangeFilterAsync` method now correctly supports `NullOption` enumeration. The method supports the equivalent functions of the Filter dialog box for dimensions or measures. You can include or exclude null values from a range, or set a special filter for all null or non-null values.

- The `GetFiltersAsync` method, now correctly checks for the **Only Relevant Values** option when evaluating other filter settings that might be set, and returns only the values that pass those filters. The method now accurately returns all the filters used in a sheet.

- When a Tableau view is embedded in a Salesforce org page, the drop-down menus in the view now work as expected.

- When you click column or row headers in an embedded Tableau view, selection events now fire correctly.

## Changes in the JavaScript API for Tableau 2020.2

This section lists the changes that were made for the version of the JavaScript API that ships with Tableau 2020.2.  
JavaScript API version: `tableau-2.5.0.min.js`.

- To support the [Tableau Data Model](https://help.tableau.com/current/pro/desktop/en-us/datasource_datamodel.htm) introduced in Tableau 2020.2, the Tableau JavaScript API provides new APIs and data structures that support the logical and physical tables in the data model. Use these new methods to get the underlying data from worksheets. The new methods replace `getUnderlyingDataAsync`. Starting in Tableau 2020.2, a data source can have multiple logical tables, and a logical table can contain one or more physical tables. If you have an existing embedding solution that use the deprecated `getUnderlyingDataAsync()` method to get underlying data, the method call could fail if the data source contains more than one logical table. You should update your embedding solution to use these new methods.  
    
     
    | Interface/Method | Tableau 2020.2 and later |
    | --- | --- |
    | Worksheet.getUnderlyingDataAsync | Deprecated |
    | Worksheet.getUnderlyingTablesAsync | New |
    | Worksheet.getUnderlyingTableDataAsync | New |
- To support the data model, the JavaScript API also includes the `LogicalTable` class that has two properties: `getCaption()` and `getTableId()`. The `getCaption` returns the name of the table as it appears in Tableau. To get the underlying data from the table, you use the id returned by `getTableId()` when you call the `getUnderlyingTableDataAsync()` method.  
    For more information about getting underlying data from worksheets, see the [Get Underlying Table Data Example](https://help.tableau.com/current/api/js_api/en-us/JavaScriptAPI/js_api_ref.htm#gettabledata).
- New method showExportPowerPointDialog() that displays the Export to Power Point dialog box, which shows a dialog allowing the user to choose the sheets from the workbook or dashboard to download in a PowerPoint file.

## Changes in the JavaScript API for Tableau 2020.1

This section lists changes that were made for the version of the JavaScript API that ships with Tableau 2020.1.

- Support for URL action events (`URL_ACTION`). You can now use the addEventListener() method to add an event listener for URL actions. For more information, see [URL Action Example](https://help.tableau.com/current/api/js_api/en-us/JavaScriptAPI/js_api_ref.htm#urlaction).
- The selectMarksAsync() method now correctly initiates the URL action associated with the selection.

## Changes in the JavaScript API for Tableau 2019.3

This section lists changes that were made for the version of the JavaScript API that ships with Tableau 2019.3.

- There is a new property for categorical filters. The getIsAllSelected() property returns true if all values in the filter are selected.
- The getAppliedValues() property now correctly returns the selected values if the number of selected values is under 5000. The getAppliedValues() property previously placed a 5000 value limit to the full domain of the filter, so if the filter domain had more than 5000 values, only the selected values from the first 200 values were returned. Now the return set is first filtered to the selected values before the limit of 5000 values is applied. Therefore, if the number of selected values is less than 5000, the complete set of selected values is returned. If the number of selected values is over 5000, only the first 200 selected values are returned. For more information, see [CategoricalFilter Class](https://help.tableau.com/current/api/js_api/en-us/JavaScriptAPI/js_api_ref.htm#Categori).

## Changes in the JavaScript API for Tableau Server 10.3

This section lists changes that were made for the version of the JavaScript API that ships with Tableau Server 10.3.

### Toolbar Functions

You can now access toolbar buttons so that you can customize the controls for the visualization. In this release, you can call methods to control the Undo and Redo buttons and set up an event listener to monitor toolbar state changes. For more information, see [Toolbar State Example](https://help.tableau.com/current/api/js_api/en-us/JavaScriptAPI/js_api_ref.htm#Toolbar).

## Added to the JavaScript API for Tableau Server 10.0

This section lists changes that were made for the version of the JavaScript API that ships with Tableau Server 10.0.

### Get Data for Visualizations

You can now get the data that was used to create the currently displayed visualization. Use the `getSummaryDataAsync` method and the `getUnderlyingDataAsync` method to get data for the currently active sheet. The `getSummaryDataAsync` method displays aggregated data for the fields used in the current view, that is, it displays data only for the measures and dimensions used to create the view. The `getUnderlyingDataAsync` method displays data for all fields in the data source that is used by the current view. For more information, see [Get Data](https://help.tableau.com/current/api/js_api/en-us/JavaScriptAPI/js_api_samples_get_data.htm) and the [API Reference](https://help.tableau.com/current/api/js_api/en-us/JavaScriptAPI/js_api_ref.htm).

## Added to the JavaScript API for Tableau Server 9.1

This section lists changes that were made for the version of the JavaScript API that ships with Tableau Server 9.1.

### Easier way to load the latest version of the API

You can load the JavaScript API library using a file name that contains only the major version number, such as `tableau_2.min.js`. This in turn loads the most recent version of the library.

For details, see [Accessing the API](https://help.tableau.com/current/api/js_api/en-us/JavaScriptAPI/js_api_concepts_get_API.htm).