Salesforce Flow allows us to automate business processes by building applications, known as Flows. Using Flows, a user can collect information; or, they can update, edit, or create records in Salesforce. Furthermore, Flows can execute logic, interact with the Salesforce database, call Apex classes, Platform Events, and guide users through various screens to streamline the process of collecting and updating data. Once a Flow is built, an Admin can make the Flow available to the right users or systems. After Salesforce Recent release system administrator can create a Flow that can fire when a record is created or edited.
Just like most things in life, however, Salesforce Flow is not immune to bugs:(; and, neither is it any easier to debug Salesforce Flow :(. Salesforce, however, does offer a handful of debugging tools – such as, a user can use Fault Email sent by Salesforce (not very helpful in every case); or, use Screen elements (adding a temporary element); or, last but not least, leverage standard Debug Log. Each option, however, has its pros and cons. If one lacks experience on how to read a Debug Log then, using screen elements is quite helpful in debugging a flow. Setting Debug Log is quite easy but understanding/reading each and every line of Debug Log message/outcome is relatively challenging. If you are interested in developing mastery on how to read Debug Logs (Only Flow part) in Salesforce then, please read this article.
You might have created a Flow with multiple Screens, Assignments, or Data elements. After development, the second step is to test the Flow, to make sure that it is working as per the design (obviously based on business requirements).
Before the Summer’18 release, we were using Screen elements to make sure that Flow is passing correct data to the next element.
In the above example, I am using the Screen element just to debug/test the Flow to make sure that it is passing correct data – i.e. Lead ID, in my case – to the next element Add to Campaign (Create Records) element.
After Summer’18 release, however, with just a few clicks, you can now debug your Flow with a built-in debug tool within the Salesforce Flow Designer! No need to add Screen elements to test the outcome. Salesforce Flow Designer now offers a debug option to help you test and troubleshoot your flows. Easily set input variables, quickly restart flows, and view all the gory details of what’s happening in real-time as your flow executes. The new feature includes the following capabilities:
- Easily specify the values of input variables. After running the flow, you can quickly change those values and rerun the flow.
- Choose whether sub-flow elements are running the latest version of each referenced flow.
- View step-by-step details of all operations, actions, and variable assignments as the flow execute them.
- At any time, even mid-run, quickly restart the flow so that you can try a different branch.
In this article, I am going to show you how one can use the new Flow debugging technique that allows you to debug in Flow Builder. Let us start with a business use case. Read the rest of this entry!