Summer ’21 Release will be in our production environments very soon. Like the previous few releases, also Summer ’21 release contains many great enhancements to flows.
1- Multicolumn Screens
There is a new component called Section. Using this component, you can divide a flow screen to multiple (up to 4) sections and columns. Section component is responsive and it switches to one column on mobile.
In order to add additional margins to the sides, you can add thin columns and leave them blank. Labels of the components in the sections can be translated from Translation Workbench.
2- Setting a Default Value for Selection Components
There were some limitations about setting a default value to a selection component (picklist, radio button, etc.) that uses picklist choice set or record choice set. There were some complicated workarounds but they were not good enough. With this new feature, you can say goodbye to these complications. Now you can set a default value to any selection component using any flow resource. At runtime, a choice is preselected if its value matches the component’s default value.
Another good news is that picklist component now has a “–None–” option by default! Before, you had to create a choice with this label and use decision element to see if a choice was selected or not.
3- Using Is Changed Operator in Decision Logic and Start Element
Is Changed operator is now available in flows! You can use Is Changed operator in condition logic for Start elements and Decision logics in record triggered flows. Using this operator, it is possible to check whether a certain field value is changed in the current transaction.
In the Start element, Is Changed operator is available only for flows that are triggered when a record is updated. It is not available for flows that are triggered on create. When you set up the condition for the object, use the Is Changed operator with fields of the selected object. If the condition with the Is Changed operator is True, then the flow is triggered to run when the field value is changed. For Start elements, if you select the Is Changed operator in a condition, you cannot change when to run the flow for updated records.
In Decision elements, you can use the Is Changed operator with field values of the $Record global variable. If the condition with the Is Changed operator is True, then the flow executes the outcome when the field value is changed.
4- More Functions Are Available in Formulas
ISCHANGED, ISNEW, and PRIORVALUE functions are now available in record triggered flow formulas for new and updated records. However, none of these functions are available for flows that are triggered when a record is deleted.
With this and the previous features, we are now one step closer to move all our Process Builder automations to Flows.
5- Place Fields from Salesforce Objects Directly on Flow Screens (Beta)
To add a field to a flow screen from an object involves many clicks. You have to write the label, API name, select if it is required or not and then map the field using assignment or any of the get/update/create/delete elements. However, with this new feature, you can add fields to the flow screen from a record variable and build your screens faster.
There is a new tab called Fields (Beta). You can provide your record variable and depending on the object it will display you the available fields. Just drag and drop the field, you don’t have to configure the field at all. All the properties of the field can be viewed/changed from the Object Manager.
Since it is announced as a Beta feature, there are some limitations. Record fields support these field types: Checkbox, Date, Date/Time, Number, Text, Text Area, and Text Area (Long). Secondly, record fields don’t support the default values of their source fields.
6- Collection Sort Element
There is a new element called Collection Sort, which can be found under the Logic section.
It lets you add multiple sorting to a collection, which means that you can sort records in a collection by multiple fields (up to 3). Second thing that you can do with this element is to limit a collection.
This element works with any kind of collection but if it is not a record or Apex-defined collection, it cannot be sorted by a field. Instead, it can be sorted in descending or ascending order.
To see a use case example, read this post: Limit Collections in Flow
7- Improved Screen Component Preview
When you add a standard component to a flow screen, you can preview the screen and see how it will look like. However, this option was not available for some standard screen components and placeholder was displayed instead of the preview. Starting with Summer ’21 release, it is possible to preview more standard components including Address, Call Script, Dependent Picklist, Email, Display Image, File Upload, Lookup, Name, Phone, Slider, Toggle, and URL.
You can see another small enhancement of Summer ’21 release in the picture above. There are eye icons above some of those screen components. They indicate that those components have visibility conditions.
8- Find Failed Flow Interviews
Paused Flow Interviews in Setup is now called Paused and Failed Flow Interviews. You can find all the failed flow interviews directly in one place and you can create custom list views as well. Paused Date column changed to Paused or Failed Date, which shows the date/time the flow interview failed.
Screen flows, record-triggered flows, schedule-triggered flows, and autolaunched flows that are not triggered are saved and available to open in Flow Builder from the Failed Flow Interviews list view. When you click a flow interview, it is opened in Flow Builder with path highlighting, this way you can see what happened when the user hit the failure and easily troubleshoot what went wrong.
9- Debug Record Triggered Flows
Before Summer ’21 release, you had to activate your record triggered flow in order to see if it is working. Now it is possible to debug record triggered flows. Click the Debug button, select the record that you want to debug with, and select whether to pretend the record was created or updated. If you want to test the flow’s logic independent of the entry criteria, mark Skip start condition requirements.