Add fields to Salesforce Flow (Summer ’21)
Coming in the Salesforce Summer ’21 release is a new way to add fields to a flow screen element.
Instead of manually configuring and adding new fields to a Screen element, you can use the new Fields selector.
Now, before you get too excited about this there are two conditions:
- You need to be using Summer ’21 edition
- You need to have a variable representing a single record
This is a beta feature in Salesforce Summer ’21 which is available in pre-release orgs now, in preview orgs from May 7 and in your production orgs between May 15 and June 12.
Being a beta feature means you can test it in your sandboxes but it is not recommended for production use.
The second condition is having a variable that represents a single record. Let’s take a look at what this means:
Here is a simple screen flow that has a Get Records element:
The element is configured to only get the first record (so it meets the condition of a variable containing a single record). It does this by passing in recordId (the ID of the page we started this flow from).
Next, we add a Screen element:
The new Fields (beta) function is now available:
Select the Fields (Beta) tab (1) and then in the Record Variable field (2), specify the record variable that contains the fields we want:
The available fields are now displayed, separated into Required Fields and the regular fields:
The available fields can now be dragged across to the screen element. No longer do you have to manually create and configure new fields!
You will need to add an Update or Create records element to update or create new records – but at least the creation of new fields on a screen is simplified.