Tableau CRM Mass Action – How to Execute Mass Action for More than 100 Records in Tableau CRM

lightning-aura-componentslightning-web-componentstableau-crm

Context:

We have a Tableau CRM dashboard that queries account based on several filters and display them as a report table.

Taking advantage of Salesforce mass quick actions to perform mass action on the list, an action button can be reused as a widget in the dashboard to create tasks in mass for accounts.
But when there are more than 100 accounts queried, then the mass action is limited to the first 100 records.

Findings :

A custom action button calling an Aura Component is not available to be used as mass action widget feature in Tableau CRM.

With Tableau CRM Assets SDK, it is possible to embed the dashboard within an Aura component but not sure how to capture the filtered results and perform the mass action.

Questions :

Any pointers how can we call a Lightning component from Tableau CRM dashboard to operate on all the accounts displayed and overcome the limit of 100 records ?

Any other workaround how to perform a mass action on more than 100 records ?

Best Answer

Here's the solution implemented to workaround the limit :

When number of records in the TCRM table were less than 100, users continued to use the mass action button but when records exceeded 100, users manually downloaded the filtered table in CSV format using the standard download feature in TCRM.

Once the file was downloaded, users clicked on a custom button in TCRM dashboard, that redirects to a lightning page containing a LWC component.

On this custom Lightning page, users could upload the CSV file downloaded in previous step, fill in a form with common information on the task, then a button on the page allowed to generate the relevant tasks according to the list of accounts in the file. (AccountId was always present as first column in the TCRM exported file)

The LWC component used PapaParse to read the CSV file and extract records. The list of records were sent to Apex to create the relevant Tasks. LWC called apex method in async/await mode so as to process the records in small chunk and stay within governor limits.

PapaParse was also used to generate an error CSV file in case of errors from apex.