Learning Salesforce Visual Workflow and Process Builder(Second Edition)
上QQ阅读APP看书,第一时间看更新

Hands on 4 - displaying related records based on search functionality

Let's start with an example: Helina Jolly is working as a system administrator for Universal Containers. She wants to develop a Flow using which a user can search for leads based on the lead's e-mail address and select multiple leads as well.

To develop this Flow, it's first required to ask for an e-mail address as the user input. Then, we will use dynamic record choice to display the leads with the same e-mail address. To develop the Flow, perform the following instructions:

  1. Navigate to Setup | Build | Create | Workflow & Approvals | Flows.
  2. Click on the New Flow button; it will open the Flow canvas for you.
  3. Then navigate to the Palette tab, and drag and drop the Screen element onto the canvas; this will open a Screen element window.
  4. Enter the Name field as Enter the lead details; you can also add a description. Under the Navigation Options section, select Don't show Previous button from the drop-down. Optionally, you can add Help Text as well.
  5. The next task is to add a Textbox onto the screen to allow your users to enter an e-mail address. On the Screen element, navigate to the Add a Field tab and double-click on the Textbox field, which is available under INPUTS, to add it on to the screen. In the Screen overlays preview pane, click on the Textbox field to configure its settings by entering Label, Unique Name, and Default Value, and selecting the Required checkbox under the General Info section, as shown in the following screenshot:                       

  1. Create a variable (VarLeadsID) of the Text data type to store the lead's ID. We will use this variable in Dynamic Choice in the upcoming steps.
  2. Now we will add one more screen to display the leads with the same e-mail address form. For this, drag and drop the Screen element onto the canvas; this will open a Screen element window. Enter the Name, and you can also add a description for it. Under the Navigation Options section, select Don't show Previous button from the dropdown. Optionally, you can add Help Text as well.