Screen Flow Scenario in Salesforce – How to use Choice and Picklist Choice Set in Flows

Screen Flow Scenario – Create Contact or Opportunity or Case related to Account based on Choice

Answer

Select New Flow Button and then Select Screen Flow

Drag Screen and Select a picklist Value

A screenshot of a computer Description automatically generated

Picklist choices have to be Contact, Opportunity, Case

We have multiple Choice options in resource type to select picklist value:

  • Choice – A single value defined in the flow the user can choose
  • Collection Choice Set – A set of values defined in the flow the user can choose from
  • Record Choice Set – A collection of records that meet a set of criteria, similar to a Get Records element that the user can choose from
  • Picklist Choice Set – A set of values that matches an existing picklist field in your org

We need to understand which option to choose. In this case we will choose Choice option as there is no field in salesforce database and we will create single values through ‘Choice’

A screenshot of a computer Description automatically generated

A screenshot of a computer Description automatically generated

We will create 3 choices -Contact , Case , Opportunity

A screenshot of a computer Description automatically generated

A screenshot of a computer Description automatically generated

A screenshot of a computer Description automatically generated

Then we need to create Decision isContact, isCase, isOpportunity

A screenshot of a computer Description automatically generated

A screenshot of a computer Description automatically generated

A screenshot of a computer Description automatically generated

This is output we will see by creating screen element to choose object, decision for creating contact, opportunity and case, Based on decision showing screen to users.

A diagram of a computer Description automatically generated

Contact Screen will have mandatory fields

A screenshot of a computer Description automatically generated

Drag Create Record Element->Choose Contact -> Map Fields with Screen Fields

A screenshot of a computer Description automatically generated A screenshot of a computer Description automatically generated

Choose Picklist Choice Set to show StageName field picklist values. This is because field already exist in database and we need to just select object and field. This can be done using picklist choice set.

A screenshot of a picklist Description automatically generated

A screenshot of a computer Description automatically generated

 

Drag Create Record Element->Choose Opportunity -> Map Fields with Screen Fields

A screenshot of a computer Description automatically generated

A screenshot of a computer Description automatically generated

Drag Create Record Element->Choose Case -> Map Fields with Screen Fields

A screenshot of a computer Description automatically generated

Final Result

A screenshot of a computer Description automatically generated

Drag the Flow Component on the record page. Pass Recordid into a variable so we can pass the account to the flow

A close-up of a message Description automatically generated

A screenshot of a computer screen Description automatically generated

Outcome

A screenshot of a computer Description automatically generated

 

Did you enjoy this article?
Signup today and receive free updates straight in your inbox.
I agree to have my personal information transfered to MailChimp ( more information )
50% LikesVS
50% Dislikes