Day 5: Flow builder improvements in Winter 21′ #TexeiAdventCalendar

By

4 minutes de lecture

Hello everyone, hope you’re having a blast with our #TexeiAdventCalendar articles. Today I want to discuss some enhancements that came with the Winter 21′ release and that involve Flow Builder. I hope you had a great time yesterday with Fabien Taillon’s article. In case you missed it, you can find it here and learn to manage deleted fields in lightning experience. Now let’s get to it!

It is an ongoing process for now several release for Salesforce to improve significantly the Flow builder and make it the reference tool for process automation. We can mention the addition of record triggered flow, for instance, or the increasing ease of use of the interface.

The Winter 21′ release is no exception, and here we’ll see some of the improvements that came with it.

Before delete trigger

As mentioned above, Salesforce added the possibility for the flow to act as a record trigger, to replace Apex trigger for simple tasks. The first events available were After Create and Update in Spring 20′, then the Before Create and Update in Summer 20′, and now the Before Delete is available in the Winter 21′.

Compared to Apex triggers, here are the remaining events that are not yet included in the Flow builder: After Delete, and the Merge and Undelete events. These event may be available in the future releases.

The Before Delete trigger event is now available for record triggered flows

We can now wonder how Flows compare to Apex in terms of performance, features and usability. Here is an article that compares flows and apex for before update events. And there seems to be an advantage on the flow side, but it would require deepened investigations to check the other events as well.

Debug Flow as another user in the builder

The debug feature allows you to test your flow by logging many information while it runs. However, it was always running as if the admin was launching the flow. Which can be far from the end user case because of security reasons.

Winter 21′ comes with the possibility to debug a flow as a specific user, which solves this issue and gives a nice tool to test your process implementation for real use case without needing to activate the flow, logging in as another user and running it in the interface each time.

You can select a user to run the flow using his or her permission, directly in the debug window

Note that this feature is not always available and may need to change a setting in the Process Automation -> Process Automation Settings section. Indeed, the Let admins debug flows as other users checkbox must be selected. Otherwise the Run flow as another user option in the flow builder will be deactivated.

This option must be selected in order to be able to debug a flow as a specific user

Add conditions for record triggered flows

To follow up on the first section about record triggered flows. Here is another feature that allow to have more control on the way your flows are triggered. Before Winter 21′, all records fulfilling a set of conditions were processed. Now, you can choose to enter the flow only if the change that triggered the flow led to the condition being fulfilled. This spares yourself doing additional checks in the flow, as well as potentially improving the performances. This option could already be found in process builder (the “Do you want to execute the actions only when specified changes are made to the record?” option). Now it’s available in flows too, and only for the Update and Upsert events.

You can choose to run the flow only if the record is updated to meed the requirements

To sum it up, the continuous effort on the part of Salesforce to improve the Flow builder is going on. With new features that extend the possibilities offered by this tool. In cases where a process can be done with flows, this tool has the advantage of being easily accessible and maintained by someone who does not want to code. There are still some situations in which Apex code is needed. But the scope of what can be done in Flow builder is increasing, and we can expect it to increase even more in the next releases.

Here it is for the flow improvements. Hope you had a good read, and come back tomorrow for a new article written by Lucile Bougeret-Incardona.

And if you don’t want to wait, you can go to https://texei.com to see more content. Follow us on LinkedIn here and on Twitter here. Have a great day!

Read more posts

Enforce code standards with PMD

Developers working on a project usually set coding rules to have a standardized codebase. It is an important piece of the code maintainability, and it can be very easy …
March 2023
Advices
Scratch orgs

Uncovering Salesforce Settings: A Step-by-Step Guide for Scratch Orgs

Today, it’s pretty easy to build your Scratch Org definition file when you know what Settings you want to activate, as they are mapped with the same setting names …
February 2023
Advices
Business Analyst

Core qualities of a Business Analyst?

A common definition we are used to hear is that being a Business Analyst means to have a combination of both hard skills and soft skills. What does a …
June 2022
Advices
Image d'illustration d'une employée travaillant sur un ordinateur portable

Process builder and workflow make way to Flows (½)

Overview “If you can do it with a Workflow, then do it with a Process Builder, because everything a Workflow does, a Process Builder does it better”. If you …
March 2022
Advices

Day 22 : Salesforce new “Migrate To Flow tool” in Spring 22

As most of you already know, the workflow rules and process builders are planned to be retired in 2023 (no precise date defined so far). Today, I’m going to …
December 2021
Advices

Day 18 : Fake callout responses for test classes !

Hello everybody ! Today let’s talk about Apex tests classes in Salesforce. Everyone loves a good test class, and Salesforce makes it official by requiring to have a minimum …
December 2021
Advices