Editing Records In Memory

With the ultimate version of Flow Data Table, it is possible to edit records in the table and then output them to subsequent steps of the flow for additional processing. In the context of Flow Data Table, this is referred to as "In Memory Edit" because it does not save the edited records to the Salesforce database. Instead, the edited records are placed into a data table output variable record list.

In this guide, we will extend the flow from the getting started guide to allow in memory editing of records and then save them to the org database using the Update Records flow element. Although processing would often be done to the edited records, we will simplify the scenario for this tutorial.

Outputting Edited Records

Starting with the Flow you created in the getting started guide, perform the following steps in Flow Builder:

  1. Select the Accounts Table flow we created in the getting started guide
  2. Double click on the Accounts Table element
  3. Select the AccountsTableCmp component
  4. In the right pane, scroll down to Table Mode and select In Memory Editing
  5. Ensure your configuration matches the screenshot below and click Done

Now the Accounts Table will allow editing and output the list of edited records.

Updating The Outputted Records

Now that the Accounts Table element is outputting the list of edited records, the possibilities are endless! However, for the sake of this guide, we will simply save outputted list of records to the org database.

  1. Drag an Update Records element onto the flow canvas
  2. Fill out the Update Records form as follows:
    Label: Update Accounts
    How to Find Records to Update and Set Their Values: Use the IDs and all field values from a record or record collection
    Record or Record Collection: AccountsTableCmp.recordListOut
  3. Ensure your configuration matches the screenshot below and click Done

At this point your flow should look like the below:

  1. Save and Run the flow
  2. Edit one or more records and click Save. You can open another tab and navigate to the account detail pages to verify the records have not changed.
  3. Click Next
  4. The flow will run then show the table again. You will notice that edited records persisted. If you navigate to the record detail page of the edited accounts in your org you will also see that the data has been saved.