Use Case: Mass Update Records From Related List #2
In this article we introduced the magical ids variable to help us mass edit records in a related list, and how you can incorporate it into our flow solutions. However, you will have to choose between two outcomes:
- Mass update the same fields with the same value for each record
- Update the record one record at a time on the screen
We have built the first one, and now we want to make a more complex solution. With solution#2, you get to customize the changes on each record individually, so it provides more flexibility to our users. However, it will be less efficient because there are more elements inside the Loop, so please do not use this solution if you have many child records (More than 50). See the comparison in the Note section.
Recap On The Magical “ids” Variables
- This variable is not documented officially, so you can only know when you are in an exclusive club. (Joking. I did a lot of searching.)
- Because of reason 1, there is a risk that it can break. (My first testing didn’t work at all)
- It only works with related lists/list views that have checkboxes in the front.
- The setup of the variable has to be EXACTLY like below.
Let’s dive in on how to set this up!
* Big thanks to Jaime from Viajes BIDtravel for sending in the case, and to Peter from Findock for sharing his thoughts!
Lulu Mobile uses the standard Account and Case object to keep track of their customers’ cases. Sometimes there can be many cases under one account, and they want to be able to mass edit the cases right from the related list to boost productivity.
Even though we can get multiple ids at once, they still exist as a collection variable. To edit each record, we will have to use a loop to unpack the collection. Also, since the collection is stored as text, we will need to use Get Records inside the loop if we want to show the current value of each record.
We will launch the solution as a List View button, and it works on both related list and list view.
Please wait while flipbook is loading. For more related info, FAQs and issues please refer to DearFlip WordPress Flipbook Plugin Help documentation.
Comparison for the two flows:
See the pros and cons of two flows and choose the one that suits you the best.
|Flow#1||Flow#2 (This Article)|
|Pros||+ Less elements in Loop so better performance|
+ Can skip the Done Screen and use retURL
|+ Can see the current value of each field|
+ Can modify each record separately
|Cons||– Cannot redirect back to original Account page||– Longer process time and more screens|
Comparison for different solutions when there is only one record:
This solution can work even if you only want to edit one record. Then it will be similar to the solution in this article – Add Clone Button To Related List. Here is the comparison of two different methods:
|List View Button (This Article)||Formula|
|Pros||+ Good looking UI|
+ Can handle multiple records
|+ Easier to reach|
+ Can have other field values fed to input variables
|Cons||– Always has to use Loop even for one record only||– Can be confusing as it is a field on object|
|Loop||Update Records||Input Variable|
|Get Records||Screen Element|
Does the solution solve your problem? If not, write us what your problem is and we will build the flow for you!
Hi, thanks for sharing, one question from me: this will display each case one multiple screen for revising then what’s difference between this and Salesforce out of box list view inline edit feature
Hi Wayne, it’s a very good question. I have actually mentioned a bit in this article:
To summarize, there are more limitations of inline editing than this solution:
1) In order to use inline editing, you have to create a list on a specific record type. Thus you cannot edit the records in different record type together
2) There are several fields you cannot update using inline editing (ex. long text) or need additional buttons (ex. owner), but in flow you can update them at once
But the biggest difference is that the same button can be used in both related list and list view. I personally love inline editing a lot, so I would recommend only use flow when inline editing doesn’t meet the need.