Using debug screens

Another way to debug the Flow is to keep a debug screen after each of the Flow elements (for example, after Record Lookup, Record Create, Record Delete, Record Update, Assignment, or Decision) while developing it. This will help you check each variable or field value in every step, and you can also check whether the Flow is working as designed (Flow follows the correct path) or not. You can add any field onto the debug screen for which you want to check values at runtime. Once you are done, disconnect screens for the normal running of Flow and in future, you can use it if required.

Let's look at a business scenario. In Chapter 3, Manipulating Records in Visual Workflow, we developed a Flow, that is, Create Leads. Say, Helina Jolly is working as a system administrator in Universal Containers and she worked on this Flow. She received a few messages from business users saying that Flow stops the creation of leads into the system.

She is planning to add a debug screen after the Create Lead Record element to make sure that the Record Create element is working fine. The steps to debug the Flow are as follows:

  1. Open the existing Flow Create Leads that we created in the previous chapter.
  2. From the Palette tab, drag and drop the Screen element onto the canvas; it will open a Screen element window for you. Enter Name as Verify Lead Creations; you can also add Description. Under the Navigation Options dropdown, select the Don't show Previous button option.
  3. The next task is to add a field onto the screen in order to display the new lead's ID. Add Display Text to the Screen element by clicking on the Add a Field tab. Double-click on the Display Text field available under the OUTPUTS section, enter the Unique name field as Verify Lead Creation, and select the {!VarTLeadID} resource from Variables, as shown in the following screenshot:
  1. Once you are done, click on the OK button.
  1. Use the connector to connect the Verify Lead Creation debug screen with the Record Create element and Create lead record, as shown in the following screenshot:
  2. Save this Flow as the new version. From now, when Helina tries to create a new lead, the debug screen will display the newly created lead's ID.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.149.152