Data Table using Salesforce Flow

Data Table using Salesforce Flow

Salesforce introduced a “Data Table” in the flow. Using this data table in Salesforce flow, we can display the list of records. Using this data table and flow, we can perform the following actions:

·       Display a list of records in table format

·       Create or update selected records.

·       Delete the selected records in Salesforce.

Here, we are going to see the following use cases for the data table.

·       Let the user select the list of records and update those records with specified values.

To achieve the above use cases, we first need to create a screen flow.

·       Click Setup.

·       In the quick find, search Flows.

·       Select Flows and click New Flow.

·       Choose the Screen Flow and click Create.

The next step is to add the “Get record” element into the screen component to get all the records.

Article content

The next step is to add a Screen element into the flow to display the records collected from the get element. Add the data table component to the screen.

Article content

Enter the API name and label name for the data table component. Select the use label as the table title.

Configure Data Table Source

            Source Collection – Collection of records to use to populate the table.

            Show search bar – Enable users to search and filter the records they want.

Configure Rows

      Row selection mode

·       Multiple - The user can select any number of rows between the Minimum Row Selection and Maximum Row Selection values.

·       Single - The user can select up to one row.

·       View - The user cannot select any rows.

Configure Columns

         Source Field - Select the field you want to show in the Data Table.

         Column Options - Select the Custom column label. Enter the label, and the same label will be shown in the Data Table column.

Store the Data Table Component’s Values in the Flow

First Selected Row -- First record in the table selected by the flow user. If a user selects two records, this record is the first selected record from top to bottom.

Selected Rows -- The list of records that the user selects. The records are ordered from top to bottom according to their position in the table.

Article content

Once the data table component is configured, we need to loop the element to process the selected opportunities from the data table.

Article content

Then, add the Assignment element to assign the new stage value for the Stage field and assign the selected records to the record variable.

Article content

After, we need to add an Update element to update the opportunity record.

Article content

In the last step, add a Screen element to display a success message.


Article content

 

Once you developed the flow, click save and place the screen flow on the home page or Record page wherever you want. Finally, the output is below.

Here, we select the opportunity and click next. Now, the opportunity stage has been updated, and the user can see a success message.

Article content

Consideration

·       The maximum height of a Data Table is 400 pixels.

·       The Data Table flow screen component is not compatible with mobile devices.

·       You can select up to 200 records in a Data Table.

·       A Data Table can display up to 1,500 records.

·       If you include a lookup or master-detail relationship field in a Data Table, the table does not display the field value. For example, a Data Table cannot display the Name field of a related record. To display field values from related records, use object formula fields. You can also use object formula fields to link to related record fields, for example: HYPERLINK (“/" & CASESAFEID(Id), Related_Record__r.Name, "_self")

 Please refer to the following links for more details. https://help.salesforce.com/s/articleView?id=sf.flow_ref_elements_screencmp_data_table.htm&type=5

To view or add a comment, sign in

Others also viewed

Explore content categories