Formstack offers the ability to make Salesforce lookup fields available in your forms displayed as Autosuggest or Table Popup.
What are lookup fields?
Lookup fields allow you to associate two records together. Lookup fields in Formstack work with any of your object’s lookup fields or master-detail fields (if your object is a detail record).
These fields are listed as regular fields in the Available Fields list for your object and can be used to expose a lookup field in your form to the public web.
How do I make lookup fields available?
Lookup fields always default as hidden and read-only. To make your lookup field available to your end users, uncheck the 'Hide Field' and 'Read-Only' options in the field's settings.
Formstack lookup fields work off of your object's existing Salesforce list views, allowing you to decide what records and fields your end users are able to see when selecting a record for your lookup field. To select an existing list view for your lookup field, simply select from the list in the 'Select a List View' option in the field's settings.
In the field’s settings for a lookup field, you’ll also notice a ‘Display as:’ option where you can select between Autosuggest and Table Popup.
Read below to determine which choice is best for your form.
Autosuggest
Autosuggest functions similarly to a lookup field on a Salesforce record detail page. Once a user clicks or tabs into a field and begin to type characters, records in the list view matching those characters will show up in a drop-down menu for the user to select starting from a single character input:
Autosuggest also provides accessibility functionality that is not provided in the Table Popup option. It removes the need for a mouse to interact with and navigate the lookup field. Autosuggest also provides support for accessibility features, like keyboard navigation and screen reader compatibility.
Table Popup
The Table Popup option allows users to see records in a grid-like view similar to a Salesforce list view. It provides the user the ability to see more than a single display field value depending on how many columns are configured in your Salesforce list view:
Unlike Autosuggest, the Table Popup option requires the end user to click the magnifying glass to engage with the field, does not provide screen reader support, and requires a mouse to navigate within the field.
With either option you have the ability to select a specific Salesforce list view and the ‘Display field value:’
Best practices for using lookup fields on forms
- Lookup fields in your forms will allow for real-time access to your Salesforce records on the public web, so it is important to carefully consider which list view you are making available for your lookup field. Never expose any personal or confidential data in your list views.
- We recommend creating custom list views for your forms, rather than using existing list views.
- Lookup fields in your forms will display list view records in a small popup window when activated. As such, we recommend keeping the number of fields in your lookup field's selected list view to a maximum of 3-5 fields.
- Try to limit the number of records in your lookup field's list view as much as possible. Having too many records will result in a slower loading time for your form's lookup field selection popup.
- The first field in your lookup field's list view should be a field that easily identifies a record, as this field will be the field displayed in the form after a selection is made. For users, this might be an email address or a last name, whereas, for companies, this might be an ID or company name.
🔺 Salesforce lookup fields are limited to showing the first 2,000 records in the configured List View due to a Salesforce API limit. See our feature Salesforce Search to be able results from List Views with more than 2,000 records.