Creating an SObject Variable

Here is a business scenario: Robby Williams is working as a system administrator for Universal Containers. Currently, he is developing a Visual Workflow and wants to create a variable to store the Account record field's values.

An SObject Variable is used to hold the field values for a record of a particular object. You can use an SObject Variable as a container in the Flow to store, update, and reference field values for a record. To create an SObject Variable in your Flow, follow these 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 Resources tab and double-click on SObject Variable, which is available under the CREATE NEW section.
  4. This will open a window where you have to enter Unique Name, Description, Input/Output Type, and Object Type. In this scenario, select the Account object from the drop-down list, as shown in the following screenshot:
              

5. Once you are done, click on the OK button.

For best practice, in this book we will use  Sov as the prefix for an SObject Variable.