Using Salesforce Data In the Webform


While the primary focus of this module has been on sending data into Salesforce, there has been some effort placed into exposing some Salesforce data to form administrators who wish to use it in collecting data. Specifically, any field of type "Picklist" can be used on a webform. When the form is presented to the user, the picklist will show up in the form of a drop down list, where the options in the list will be driven by the picklist values defined in Salesforce.


On the "Components" form, a new component has been added - Salesforce Picklist. Add a component of that type to pull data from Salesforce into the webform

Note: the initial "build time" for the list of all possible picklist fields can be quite lengthy. This data is cached, so subsequent uses will be much faster

Many of the options on the edit screen are common to other components. The fields which warrant special attention:

  • Pick list. The actual picklist source to be shown to the user. This list is organized by Salesforce object
  • Exclusion list: This field allows the form administrator to eliminate some options, even if they are defined within Salesforce. For instance, some options may be for internal use only, and shouldn't be shown to the general public. This field will allow the form administrator to filter out those options.
  • Sorting. The list can be sorted in one of three ways
    • The order defined in Salesforce
    • Alphabetically
    • Randomly

Dependent picklists

Salesforce supports the notion of "dependent picklists." That is, the choices available for a dependent picklist are limited by the choice made in a "controlling" list. This module supports that as well. If a deendent picklist and it's corresponding controlling list are both added to the same form, then the choice made in the controlling form will dynamically update the choices available in the dependent list. If no valid choices remain for the dependent list, it will be hidden completely from the form.

Pre-defined lists

All Salesforce objects can be presented to users in the form of pre-defined select lists. To do this, add a select control. Within the edit form for select lists, there is an option to choose a pre-defined list. All Salesforce objects should be available as choices, unless the site administrator has limited the valid selections.