Display Picklist Values by Record Type in Salesforce Screen Flow : Abhijeet
by: Abhijeet
blow post content copied from SalesForce FAQs
click here to view original post
### Summary of Content This tutorial explains how to create a screen flow in Salesforce that displays picklist values based on the selected record type. The example focuses on the Account object, specifically the Industry field. **Key Steps:** 1. **Create a New Flow**: Start by navigating to setup and creating a new screen flow. 2. **Add Screen Elements**: Configure the first screen to show record types of the Account object and create a picklist for selecting a record type. 3. **Define Record Type Choices**: Set up a choice resource to filter record types based on the Account object. 4. **Assign Record Type ID**: Create a variable and assign the selected record type ID for later use. 5. **Display Picklist Values**: Add a second screen that shows the Industry picklist based on the selected record type. 6. **Create Record**: Finally, create an Account record using the input values from the flow. To view the picklist values, the flow must be run in debug mode. Once completed, the newly created Account record can be verified in the Account object. ### Conclusion This tutorial provides a clear guide on how to dynamically display picklist values in Salesforce screen flows based on user input. It helps users understand how to set up screens, variables, and assignments to create a functional flow. ### Additional Context Using screen flows in Salesforce allows for a more interactive user experience when entering data. By tailoring picklist options based on the selected record type, users can ensure they are providing relevant information, reducing errors and improving data quality. ### Relevant Hashtags for SEO #Salesforce #ScreenFlow #PicklistValues #RecordType #SalesforceTutorial #CRM #SalesforceFlow #AccountObject #DataEntry #SalesforceTips #SalesforceBestPractices
In Salesforce, we use screen flow to create records. Meanwhile, we need to enter the required fields to create the records. Sometimes, it includes conditional field values, such as picklist values based on the selected record type of the object.
In this Salesforce tutorial, I will explain how to display picklist values by record type in Salesforce Screen flow.
Create a Screen Flow Displaying Picklist Values by Record Type
In this example, we will create a screen flow displaying the picklist values from the Account picklist field Industry based on the selected record type.
To create a screen flow, navigate to setup>quick find> flow. Then, follow the steps below.
1. Click on the New flow button, then select Screen flow in the next window and click the Create button.
2. In the screen flow, first we will add the screen element to display the record types of the Account object. For that, configure the add screen component to the flow and configure it in the following way.
- Enter the Name and API label for the screen component.
- From the components, add the Picklist to the screen region and enter the Label and API Name, such as SelectedRecordTypeId.
- Go to the Choice field and select New choice resource.

3. Define the new resource for the record type picklist with the following details.
- Select the variable type as Record Choice set and enter the API Name as AccountRecordTypeChoiceSet, or you can name it your way.
- Select the Object as RecordType.
- In the Condition Requirements, select the filter condition as SobjectType – Equals – Account to get the record type of account object.

- In the section Configure each choice, select the Choice Label as Name and Choice Value as Id. This will fetch the record types from the record type ID.
- At last, click Done.

4. To assign the record type id so that picklist values will be displayed accordingly, we will add an assignment element. Before that, create a New resource for the assignment element.
- In the Toolbox, click on the New Resource button.
- Select the Resource Type as Variable and enter the API Name as record_variable.
- Select the Data type as Record and select the Object as Account.

5. Now add an Assignment element to the flow below the first screen. Enter the Label and API Name for the Assignment element.
After this, go to the section Set Variable Values, select the Variable as single record variable we created {!record_variable.RecordTypeId} and Value as {screen1_label.recordtype_picklistlabel}.

6. Add the second screen element to the flow in which we will display picklist values of the Industry field according to the selected record type.
Now, configure the second screen in the following way:
- Enter the Label and API name for the screen, such as Picklist_Screen.
- Click on the Fields tab in the screen component and in the Record Variable select the Account variable that we have created.

- Now, you will see all the fields of the Account object. From the fields, drag and drop the Industry ( picklist) field to the screen region.
At last, click on the Done button.

The picklist values will not be visible on the screen in preview mode. To view the pikclist value, we have to run the flow in debug mode.
On this screen, I’ve also added the text component to take the input for the account name.

7. Add a Create Record element to create the Account record from the input account name and account industry.
Enter the Label and the API Name in the section “How to set record field values“, select the option Manually. After this select the object for which we are creating records.
In the Set Field Values section, map the field with the input values in screen flow.
Here, we have mapped Indutry with {!record_variable.Industry} and Account Name from the second screen input value {!AccountName}.

8. To debug the flow, click on the Debug button. Then, in the next window, click Run to run the flow.
In the first screen, you will see the record type options for the selected object. In my org, there are two record types for account object that are displayed on the first screen.

After selecting the record type, the flow moves to the next window, which displays the Name input and picklist field values according to the selected record type.

The record will be created for the account object as we click on the Save button.
To ensure that the record is created with the select picklist value, navigate to the Account object and open the new record.
Here, we can see the record New Hampshire Machineries is created with the selected picklist for the Industry field as Engineering.

This way, we can add Record Types in Salesforce Screen flows and show picklist values according to the selected record type.
Conclusion
In this Salesforce tutorial, we have learned how to dynamically create screen flows to display picklist values based on the selected record type. By setting up screens, variables, and assignments, we created a screen flow to capture the record type, used a variable and assignment to store the selection, and displayed context-relevant picklist values, like the Industry field, in a second screen.
You may also like to read:
- How to Pause and Resume a Screen Flow in Salesforce
- How to Display Image in Salesforce Screen Flow
- How to Add Validation to Screen Flow in Salesforce
The post Display Picklist Values by Record Type in Salesforce Screen Flow appeared first on SalesForce FAQs.
March 26, 2025 at 06:58PM
Click here for more details...
=============================
The original post is available in SalesForce FAQs by Abhijeet
this post has been published as it is through automation. Automation script brings all the top bloggers post under a single umbrella.
The purpose of this blog, Follow the top Salesforce bloggers and collect all blogs in a single place through automation.
============================

Post a Comment