Home > DeveloperSection > Blogs > SFDC Flows: Add a Form screen

SFDC Flows: Add a Form screen


Sales Force Cloud Computing  Cloud  Cloud Development  SFDC  DEV-401 
Ratings:
0 Comment(s)
 675  View(s)
Rate this:

SFDC Flows: Add a Form screen

 

In my previous post SFDC Flows: Add Flow Variables, we learn the first step for creating flows and add flow variables. This post is the extension of previous post here we see how to add a Form screen for flow and configure fields in our form.

Add a Form Screen

A screen can use form-style fields to gather data—in this case, line item information—from the flow user.

1. From the Palette tab, drag the Screen onto the canvas.

    The Screen overlay opens with the General Info tab selected.

2. For the Name, enter Get Line Item Info From User.

     The Unique Name is automatically populated based on this entry.

3. Add a field for the Line Item Number.

         a. From the Add a Field tab, double-click Textbox.

             A textbox field appears in the preview pane on the right side of the Screen overlay.

         b. Click [Textbox] in the preview pane.

         c. On the Field Settings tab, configure the field as follows.

 

                      Field                   Value

                     Label                    Line Item Number

                                                   The Unique Name is automatically populated based on this entry

                     Default Value       1

 

4. Add a field for the Merchandise.

    a. From the Add a Field tab, double-click Dropdown List.

         A drop-down list field appears in the preview pane.

    b. Click [Dropdown List] in the preview pane.

    c. On the Field Settings tab, configure the field as follows.

                     Field                             Value

                      Label                            Merchandise

                                                           The Unique Name is automatically populated based on this entry.

 

                     Value Data Type          Text

    d. In the Choice Settings section, click the drop-down arrow then CREATE NEW > Dynamic Choice.

 

The Dynamic Choice overlay appears.

5. Create the dynamic choice resource, which at runtime dynamically populates the Merchandise field with choice options, each of which represents a Merchandise record in the database.

        

   a. Enter the following values.

                               Field                                            Value

                          Unique Name                          dcMerchandise

                          Value Data Type                         Text

                          Create a choice for each       Merchandise__c

 

b. Set the filter criteria so that the dynamic choice returns only the merchandise that have items in stock.

                                 Field                                           Value    

                                 Field                                      Quantity__c 

                                Operator                                greater than

                                 Value                                          0

 

c. Set the following fields so that the choices are displayed using the Name in each Merchandise record,       sorted in alphabetical order. Also, we want the choice to store the ID of the user-selected Merchandise record.

                                   Field                                 Value

                                  Choice Label                   Name

                                  Choice Stored Value       Id

                                  Sort Name by                 Name

                                                                            Ascending

 

d. Save the quantity in stock from the user-selected merchandise record to the flow variable we already created.

                                 Field                                Value

                                 Field                              Quantity__c

                                Variable                       {!vQuantityAvailable}

 

e. Click OK.

The Dynamic Choice overlay closes, and the Screen overlay appears.

 

6. Add a field to capture the quantity ordered in the line item.

          a. From the Add a Field tab, double-click Number.

               A number field appears in the preview pane on the right side of the Screen overlay.

           b. Click [Number] in the preview pane.

           c. On the Field Settings tab, configure the field as follows.

                         Field                 Value

                         Label                Quantity Ordered

                                                   The Unique Name is automatically populated based on this entry.

                         Scale                  0

 

7. Add a field to capture the unit price of the merchandise.

             a. From the Add a Field tab, double-click Currency.

             b. Click [Currency] in the preview pane.

             c. On the Field Settings tab, configure the field as follows.

                     Field             Value

                    Label            Unit Price

                                          The Unique Name is automatically populated based on this entry.

                   Scale                2

 

The preview pane on the Screen overlay should now include four fields.

8. Click OK.

9. Save the flow.

a.       Click Save.

b.      Ignore the activation warnings for now.

c.       Click OK.

After this next step is to Add the record create element in the flow. We see this in my next post.

 

**This document is referred from salesforce help tutorials

 

 


Don't want to miss updates? Please click the below button!

Follow MindStick