Home > DeveloperSection > Blogs > SFDC Flows: Add Flow Variables

SFDC Flows: Add Flow Variables


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

SFDC Flows: Add Flow Variables

 

 

In my previous post SFDC: Create an Approval Process, we learn how to create an approval process. Now we move to Flows and concentrate on each steps in flow creation.

Visual Workflow enables us to build applications, known as flows, to guide users through screens for collecting and updating data. You can visually build flows using the drag-and-drop user interface of the Cloud Flow Designer. No coding required!

Here and in next few posts, we’ll create a simple flow that does the following each time it runs:

• Prompt the user for the line item information.

• Create the line item record for the invoice.

• Reduce the quantity of merchandise in stock by the quantity ordered in the line item.

 

Add Flow Variables

You can use flow variables to store data that can be used throughout the flow and referenced as values for updating record fields. In this post, we’ll create two flow variables.

1. From Setup, click Create > Workflow & Approvals > Flows.

2. Click New Flow.

             If prompted, activate the Adobe® Flash® plug-in.

3. Create the first variable.

           a. From the Resources tab, double-click Variable.

           b. Configure the variable as follows.

 

Field                        Value

Unique Name        vQuantityAvailable

Description            Quantity of merchandise in stock.

Data                         Type Number

Scale                         0

c. Click OK.

 

4. Create the second variable.

         a. From the Resources tab, double-click Variable.

         b. Configure the variable as follows.

 

Field                             Value

Unique Name             vInvoiceId

Description                  ID of the invoice to which the flow adds the new line item. A

                                       custom button on the  Invoice detail page launches the flow

                                       and passes the invoice ID into this variable.

 

Data Type                      Text 

Input and Output         Input Only

                                        This setting enables the variable to be set when the flow is launched by a custom

                                        button

c. Click OK.

 

5. Click Explorer to verify the variables are saved.

 

6. Save the flow.

a. Click Save.

b. For the Name, enter Add Line Item from Invoice and Update Stock Quantity.

                         The Unique Name is automatically populated based on this entry.

c. Click OK.

Ignore any activation warnings for now.

 

 

Now we have created the variables for flow, next we add form screen for flow.

**This document is referred from salesforce help tutorials


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

Follow MindStick