Hands on 5 - creating an opportunity form

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 create an opportunity. Later on, she wants to embed this Flow into a home page layout so that users can easily access it.

Before going ahead, the first task is doing the ground work; this means finding the fields that are required to create an opportunity in the system. In a new Salesforce organization, the following are the fields that are required to create an opportunity:

  • Opportunity Name
  • Close Date
  • Stage

It means our forms must contain these fields to successfully create an opportunity in Salesforce. To develop this Flow, follow these instructions:

  1. Navigate to Setup | Build | Create | Workflow & Approvals | Flows.
  2. Click on the New Flow button, which 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 Create Opportunities; you can also add a description. Under the Navigation Options section, select Don't show Previous button from the dropdown. 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 the Opportunity_Name. 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 onto the screen. In the Screen overlays preview pane, click on the Textbox field to configure its settings by entering LabelUnique Name, and Default Value, and selecting the Required checkbox under the General Info section, as shown in the following screenshot:                                     
  1. Likewise, add a Date field to allow users to enter Close Date, as shown in the following screenshot:
  1. Now, we will add another that allow users to select opportunity Stage.