Use and Create Flow Screen Radio Button in Salesforce

In Salesforce, Record Types are a way of grouping many records of one type for that object. These can be applied to any standard or custom object and allow you to have a different page layoutfieldsrequired fields, and picklist values

We can also display these record types in the form of a radio button in the Salesforce Screen flow when you are creating a new record in that object with screen flow. In this Salesforce tutorial, we will learn to Use and Create Flow Screen Radio Button in Salesforce.

Use and Create Flow Screen Radio Button in Salesforce

To display a Record-type in radio button on a Salesforce Screen flow, we will create a screen flow and, for that, navigate to the setup page of Salesforce and follow the below steps.

1. On Salesforce’s Setup page, go to the Quick Find box and search, then select Flows under Process Automation.

2. Click on the New Flow button in the flows setup window.

3. Select the option Screen flow and click Create.

display Record-type as Radio Button on a Salesforce Screen flow

4. Add a Screen element to the flow.

Show Record-type as Radio Button on a Salesforce Screen flow

5. Enter a relevant Label and API Name to the Screen element.

Add Record-type as Radio Button on a Salesforce Screen flow

6. Now add a radio button component to the screen, and enter the Label and API Name for the radio button component. After this, select the Data type as Text.

How to Add Record-type as Radio Button on a Salesforce Screen flow

7. Scroll down to the Choice field and click on New Choice Resource.

Use Record Type in a Salesforce Screen flow

8. In the new choice resource, select the Resource Type as Record Choice Set. Then, enter the resource’s API name and select Object as Record Type.

Salesforce Screen flow radio button

9. In the Condition requirements of New Resource, select the Field as SObjectType, Operator as Equals, and for the Value, select the object in which you want to display the record type on screen flow. In this case, the Object is Opportunity.

Use radio buttons to display record types in Salesforce

10. Under the heading Configure each choice, select the Choice label as Name, Data type as Text, and Choice Value as Record Type Id (ID). Then, click Done to save the new resource.

How to use radio buttons in Salesforce Screen flow to show record types

11. Now, we have created the choice set for the record types. At last, click Done to save the screen element.

Use Flow builder to display record types in radio buttons

12. At completing the flow, save it with the relevant Flow Label and click the Save button.

See also  How to Update Parent Record From Child Object using Salesforce Flow
Add Radio buttons to a Salesforce Screen flow

The flow is completed, now, we will test and debug the flow in the further steps.

Test and debug the screen flow

Now, we will test and debug the flow to check whether the screen flow is displaying the record types in the radio buttons.

1. Click on the Debug button in the Flow Builder.

Use Record Type in a Salesforce Screen flow as radio buttons

2. In the debug window, click on the Run button.

Salesforce Screen flow radio button to show record types

3. Here, we can see that record types are displayed as radio buttons in the flow.

Display Record-type as Radio Button in Salesforce Screen flow

4. Finally, to use the flow in the developer console, you must activate it from the Activate button.

This is how we can display the Record types as radio buttons in the Salesforce screen flow to create records while creating records using Screen flow.

Conclusion

In Salesforce, while creating the records using the Salesforce Screen flow, you might need to create new records with separate record types. By adding the record type in a screen flow as radio buttons, we can choose the record types for the new records.

In the above steps, we have learned the process of adding and displaying the record types as radio buttons on a Salesforce screen flow. In the same way, we cans display or add record types of other objects also.

You may like to read: