As an Admin, we are constantly trying to solve problems and challenges. My favorite thing about every release is seeing which tools were added to our toolshed. Some of them we use daily, some rarely ever and it varies by your role. One person may use something daily that you may never touch. But either way, it is great to know we have that tool somewhere in our shed for when that challenge arises.

The Salesforce Summer ’20 Release was back in July but now we’ve had some time to play, build, test, and deploy some of the many features that were released with it.

This blog is going to outline three of my favorite features specifically related to Lightning Flow. Hats off to Salesforce as they came out with some really cool improvements!

Run Flows That Bypass User Permissions
Admins strive to keep the information in Salesforce as accurate, up-to-date, and consistent as possible, but we face many challenges in our quest for this goal. This feature will help when we come across scenarios where we want to escalate a user’s privileges, now we can do so only within the confines of a structured flow or process that we define.

We now have the ability to allow users to create or edit records they don’t have direct access to through the use of Flow and without needing to give them access to those fields.

What’s new:
Flows run differently based on the context of the flow. We also recently gained the ability to bypass object and field-level security with ‘System Context with Sharing’ from the Spring ‘20 release. Now, with this release, we can also ignore org-wide default settings, role hierarchies, sharing rules, manual sharing, teams, and territories.

The best part is that these expanded permissions only happen within the flow! No permission sets or anything – just setup the flow and walk your user through the guided steps that we create and control!
Note: A limited set of actions and operations still run in user mode.

Why do I care?
We all get stuck with the decision of wanting to limit who can do what and just praying they don’t mess it up. At Roycon we often run into the scenario where the clients says “Well what about (insert this outlier scenario)?” – and they are valid concerns. That middle ground can be hard to navigate and difficult to manage and maintain. As with the theme of this blog, we have another option at our disposal so we don’t end up with clients wanting to make every user who comes across a permission issue a System Admin (yes – we’ve seen that).

I guess I’m cheating a little by labeling this as a blog post only about the Salesforce Summer ‘20 release when the full benefits also include the Spring ‘20 release. In the last two releases, we have gained the power of granting users additional access in a structured way in which we control. It empowers users and lets us sleep better at night!

Trigger a Flow to Run After a Record is Saved
Salesforce is in the process of moving declarative automation from multiple tools to flow builder. Each release takes more steps towards accomplishing that goal. With that being said, know that you may run into some roadblocks when testing out these two new features (before and after save).

Before understanding what this does for us, take a look at the order that Salesforce executes different events by looking at this Triggers and Order of Execution article. When we want to solve problems we need to understand what’s going on behind the scenes. An after save trigger is the equivalent of a process built-in process builder. Understanding the order of operations helps us solve the different problems we face!

What’s new:
The Spring ‘20 release added the before save flow trigger and now they have added the after save flow trigger. Previously a record triggered by a flow could only run before the record was saved, and could only make updates to that new or updated record. After save record-triggered flows can access other records, perform actions, and use more types of flow elements.

For those familiar with Apex triggers, an after save record-trigger flow is similar to an Apex after trigger.

Why do I care?
Salesforce is moving closer to flows being able to replace most workflows and record-change processes that are built using process builder. Previously, we had to launch these types of Flows using Process Builder or Apex code. Every time we get to centralize to fewer locations it becomes easier to manage and is a win. This allows us to not have process builders trigger flows which could result in having two different flow errors and provides better debugging.

As seen in the screenshot above, Admins get an additional win here with extra options and ways to use flows. We now have three different options to trigger the flow and can choose if we want to run it before or after the record is saved. More options equals more ways to solve our challenges.

Debug More Flows Faster
Lightning Flows are more powerful than workflows and process builders but also more difficult to build and a steeper learning curve. There are also challenges you will face starting to move existing workflows and processes over to flows. Personally, I avoided them way longer than I’d like to admit and I still have a long ways to go. I’ve seen flows do some really cool and powerful things that just aren’t possible with process builders and workflow rules.

With the two features mentioned above and the clear future of flows that Salesforce is moving towards, I would be remiss to not include a feature that helps with the actual building and testing of a flow. As the title of the article suggests, we have more ways to debug more flows quickly!
Note: Please read the release notes to understand when and where each of these apply as some are not universally applicable.

(1) Rollback mode – Flow Builder rolls back changes that the flow makes to the database after the flow finishes debugging the flow. Flow Builder rolls back indirect database changes too!

(2) Debug option in Flow Builder for schedule-triggered flows – When running debug, the oldest record that matches the filter condition will run.

(3) Lookup screen component so that you can set record variables more easily.

Good luck and happy building! You can check out all of the Salesforce Summer ’20 Release notes here. And filtered to just Flow improvements here.