No pilots, no betas - all flows!
So many wonderful, and long-desired changes came to Flows in the Summer ‘21. No pilots, no betas - all of these features are live in your Salesforce org!
Salesforce really took technical admins and developers looking to build clean workflows for their users into account with these new changes, making clicks an appealing alternative to a more intense programming approach for simple business processes.
Out of all the new changes, we're most excited about having multicolumn support, being able to set default values for choice components, and the ability to manage complex sorting. Let’s dive into these features and how you can get started using them right away.
The updates to multicolumn support for flows means that you can now divide each flow screen into multiple sections and columns to create an effective layout with a great UI-- without touching a single line of code. This means you no longer have to choose between one vs two-column layouts on flow screens and because of that, it’s possible to take advantage of what LWCs has had to offer since 2019 with conditionally visible, and mobile-friendly page structuring.
To start using this new feature right away, go into Flow Builder and use the Section component to move screen components into up to four columns.
As you begin editing the screen in Flow Builder, you can drag the Section components onto the screen canvas. In the Section component’s attributes, add columns and set the width. These updates are a huge step forward for building clean-looking forms on both desktop and mobile.
Default values for choice components
If you’ve worked with default values for choice components in the past, you may have had to create some wacky workarounds to address this exact behavior. The inability to default a value in a picklist or radio button was a deal-breaker for many. Now, with updates to this feature, Salesforce has helped reduce unnecessary clutter on the flow UI and created intuitive workflows that can handle your automation needs more prescriptively.
You can now set a default value using any flow resource: a record query, an action, another component, or manually select a specific picklist value when using a picklist choice set.
This update will be especially useful if you want to make it simple for users to make updates to opportunity details. After the user sets the opportunity stage, you’ll set the Stage’s picklist to the record’s preselected opportunity.
Helpful tips to keep in mind with this new update:
- When it’s runtime, a choice will be preselected if the value matches the components default value.
- For choice components that let users select a single option, like Picklists and Radio Buttons, Salesforce will automatically preselect the first choice that matches.
- For choice components that let users select multiple options, like Multi-Select Picklists and Checkbox Groups, Salesforce will preselect each choice that matches.
Sorting collections instantly
The updates that were released to sort and limit data in a collection are huge. With a new custom flow element, you can now manage complex, multi-level sorting with clicks. Before the update If you choose to do this in a flow, it implied having to invoke a custom Apex action or (if you were brave) create loops in your flows.
Now you can use the Collection Sort element to prioritize and limit the collected data or remaining items in the collection variable after sorting. This new feature will come in handy if you want to reduce a record collection variable to only a specific number of accounts. Before this update, it wasn’t possible to reorder the values and it was difficult to separate a collections variable from highest to lowest without hitting flow limits when looping a large collection.
To get started with sorting collections, drag a Collection Sort element onto the canvas. If you’re on auto-layout, click the plus sign and select Collection Sort.
Next, select a collection variable, enter the field to sort the collection by Sort By, click Add Sort Option to add up to two additional sorting fields.
A few things to keep in mind when sorting collections are that:
- If you’re working with a collection variable that contains a single list of values, Flow Builder will set and hide the Sort By field automatically
- All text fields are sorted A-Z
- Boolean fields are sorted False if Sort Order is set to Ascending
- Boolean fields are sorted True if Sort Order is set to Descending
There were a ton of updates to the flows feature suite in Summer ‘21 and what’s even better is that all of these updates to flows are live in your Salesforce org! Salesforce really delivered on their intent to make flows better for technical admins and developers looking to build clean workflows for users, partners, and clients.
During the countdown to the Salesforce Summer Release, Salesforce Developer, Andrew Davis, shared his thoughts on five of the functionality updates he was most excited to see roll out. You can check out all of his videos about the Salesforce Summer Release on How We Think.
If you can’t wait to read about it, you can watch it here.