Deletes a specific CRM Analytics dataset by ID or developer name.

deleteDataset uses this CRM Analytics API resource.

  • datasetIdOrApiName— (Required) The ID or developer name of the dataset.

The return type is void.

There are several ways to use deleteDataset. For example, you can display a list of datasets and enable delete on each dataset on the list.

This example adds a delete button to a page with datasets. Deleting a dataset displays a toast message using the lightning/platformShowToastEvent module.

This button calls the deleteDataset() method.