Visual Workflow 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, Flowscan 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.
Visual Workflow is similar to the Visualforce page for admin – for, by using Visual Workflow, an Admin one can create a powerful wizard for data entry or display a message without writing a single line of code!
There may be times when an Admin wishes that s/he could add a Lookup field to Flow Screen Element. But, as we all know, unfortunately, Visual Workflow doesn’t support Lookup field. As a result, whenever an Admin needs to use a Lookup field, s/he has to useDynamic Record Choice.
For example, suppose you want to use lookup functionality to display Chatter Group – based on matching result – to users based on their input. If so then, you can do so using the following Elements:
Two Screen elements
One Textbox field
One Dropdown List field
Dynamic Record Choice
Check out this video for detailed instructions:
Screenshot for your reference (transcript of video):
Visual Workflow allows us to automate business processes by building applications, known as Flows. Using Flows, users can: (1) collect information; or, (2) 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.
Just like most things in life, however, Visual Workflow is not immune to bugs :(; and, neither is it any easier to debug Visual Workflows :(. Salesforce, however, does offer 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 thisarticle.
You might have created a Flow with multiple screens, assignment or Record 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 Summer’18 release, we were using Screen elements to make sure that Flow is passing correct data to next element.
In the above example, I am using 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(Record Create) element.
After Summer’18release, however, with just a few clicks, you can now debug your Flow with a built-in debug tool within the Cloud Flow Designer! No need to add Screen elements to test the outcome. Cloud 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 the Cloud Flow Designer. Let us start with a business use case. Read the rest of this entry!