Salesforce Flows Troubleshooting

By in
515
Salesforce Flows Troubleshooting

At some point in our businesses, we all learn a significant lesson which is that things don’t go as planned. You can always review the instructions and reassemble that piece that doesn’t add up as we thought. The same is also true for Salesforce Flows. Occasionally flows can stop working for one reason or another. If you’re still thinking, “What’s a flow?” just remember that a flow is built in Salesforce Flow Builder and is something that automates a business process in your org supported by Salesforce.

Several things like faulty logic, permissions, or incorrect code can stop a flow from working properly. This blog will give you a brief on how to root out the problem with a flow in your org.

Salesforce Flow Builder

 

Review Salesforce Flow Terms Before You Start

Before you start troubleshooting, we suggest that you get acquainted with Salesforce Flow Builder by completing the Flow Basics or Build a Simple Flow module in Trailhead. You should be familiar with users, profiles, and permission sets. Let’s start with some basic terms:

Run executes the most recent version of the flow that you have selected. For example, if your flow updates a record when a defined action happened and you complete that action in Run, it will also modify a record in your org.

Debug is like Run, but with some extra superpowers. It lets you enter values and display debug details while running the flow. This way, you can validate how the flow processes data.

Flow Interview is an instance of a flow.

 

What is the Needed in the Flow?

Flows can contain some parts which have to work properly for the flow to be effective. If one-part pauses, the whole flow will stop. While there are many reasons a flow can break, some common instances are listed below.

  • Using the incorrect field
  • Using the incorrect variable
  • Object & field level security for user etc

No need to worry. The above-listed issues are fixable. In fact, Salesforce sends an error email to admins in the default language of the user who executed the flow. The email includes the error message with the details about each flow element the flow executed so that one can refer to it.

 

A Different Point of View

Salesforce Flows

When you checked on your end, the Flow was working fine. However, as an Admin you must know that the users are also able to access the same functionality. You will need to use that fancy debug feature but need to access it as Paul.

Depending on your browser, return to the open Setup tab or click the Flow Builder back button from the Salesforce Flow Builder.

  • Click on Setup.
  • Type Process Automation Settings in the Quick Find box.
  • Now click the magnifying glass icon seated along with the Default Workflow User text box.
  • Search for your name.
  • And then check the Let admins debug flows as other users’ checkbox.
  • Click on Save.
  • Type flows in the Quick Find box.
  • Click Create New Customer.
  • Click Debug.
  • Select Run flow as another user.
  • Type Paul in the user box and then select it & Run.
  • You will notice in the Debug Details that it now lists the user as Paul Cruz.

Enter the following data:

Company Name            Giant Technologies
Contact First Name Peter
Contact Last Name Shawn
Phone Number 932-657-1001
Opportunity Stage Leave as it is
Close Date Leave as it is

Now click Next & Review the Outcome.

As you can see, “Something went wrong” on your screen. You can check on the top of the Debug Details and then follow the output of the flow interview. This information is also shared with you via email as an admin.

 

Breakdown of Results

SCREEN: Enter_Customer_Information: Data was correctly entered into the system.

CREATE RECORDS: You will see a message pop up on the screen that says, “A record is ready to be created…” by which we can understand that the account record is created successfully.

CREATE RECORDS: The contact record will be generated when the flow is completed.

CREATE RECORDS: Create_Opportunity: It shows “Failed to create record” here. That means the opportunity record has failed.

Why would an opportunity record have failed? Let’s think about the common culprits. Ahh!! Object and field level security for the user, that’s correct. Paul’s new role requires additional access within the Salesforce org. The next logical thing to do is fix his access so that he can complete the screen flow as intended. Start at the most likely issue – the user profile.

 

Access Granted

First thing we need to check is if Paul has the right user profile for the responsibilities he has. Open the Setup tab or click the Salesforce Flow Builder back button. Type users in the Quick Find box. Click on Cruz, Paul, and now look closely for the profile assigned to him.

Sales Associate Profile? We have found the issue. This profile has restrictions that they can’t create a new opportunity. We will be needing everything from this profile for Paul, Just an exception for access to create an opportunity.

Permission sets for the saving. Apply the Opportunity permission set to Paul’s user to account for this requirement.

  • Type permission sets in the Quick Find box.
  • Now select the Create Opportunity permission set.
  • Click on Manage Assignments. And then Add Assignments.
  • Check the check box next to Cruz, Paul.
  • Assign & done.

Now, Let’s return to the flow. Run the debug as the user again to make sure everything is working as great as we think.

  • Go to setup, type flows in the Quick Find box.
  • Now Create New Customer and then Click Debug.
  • As another user check the flow, type Paul in the user box.
  • Choose Paul Cruz & Run.
  • Now enter the required details of your choice to finish the debug.
  • Review the Debug Data. You will be looking at the congratulations screen.

Bravo! The flow now works for Paul Cruz too. You have killed two birds with one stone today as you have debugged a flow & fixed Paul’s access. Until the next blog, you will learn about more resources that will help you fix another flow. Keep on flowing!

 

To learn more about Salesforce, check out some of my related blogs below!

 

Additional Resources

Cover Photo by kazuend on Unsplash

Leave a reply

Your email address will not be published. Required fields are marked *