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!
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.
Comparison for the two flows:
See the pros and cons of two flows and choose the one that suits you the best.
|Flow#2 (This Article)
|+ 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
|– 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)
|+ Good looking UI
+ Can handle multiple records
|+ Easier to reach
+ Can have other field values fed to input variables
|– Always has to use Loop even for one record only
|– Can be confusing as it is a field on object
Does the solution solve your problem? If not, write us what your problem is and we will build the flow for you!