Expert Flow Topics – Genetic Flow Patterns & Flow Metaprogramming

Every Flow is completely represented by a single piece of XML metadata, and you can download a Flow xml file, modify it, and redeploy it.

But of course, you don’t. Because it’s dangerous to hand-modify the XML. It’s easy to break things down there in the basement. So we try to provide Flow users with all the tools they’ll ever need right in Flow Builder and/or via public, well-defined APIs.

It is possible, though, to start with a flow (‘templateflow’), modify it using basic text parsing and substitution, and deploy the resulting flow (‘generated flow’).

Suppose that you resolved to start with an existing Flow XML file, and write some Apex code to modify it. You then deploy the modified version of the file up to an org, as a working generated Flow.

You are now programming Flows in Apex. So far so good.

Now suppose that you take that Apex code and turn it into an invocable action that you can insert into a Flow. You then create a Flow that gathers configuration data from a user using standard Flow screens, passes those inputs into your invocable action, and the invocable action then generates a Flow using the inputs the user provided? You now have a Flow Generator. You’re using Flows to generate other Flows. This is a powerful concept known as metaprogramming.

I did some experimentation this year with this, and have published a page of information about it here. There’s a repo you can look at with a working example of flow metaprogramming, used to generate custom Lead Conversion flows.

Consider another scenario: you want to change Flow Stages resources dynamically. Currently you can’t access them with conventional tools like Assignment elements. However, in a flow metadata file, they are simply represented like this:

<stages>
        <name>Stage1</name>
        <isActive>false</isActive>
        <label>Stage1</label>
        <stageOrder>1</stageOrder>
    </stages>
    <stages>
        <name>StageB</name>
        <isActive>false</isActive>
        <label>StageB</label>
        <stageOrder>2</stageOrder>
    </stages>

You could start with a template flow as your baseline, and then use a Flow Generator to read Custom Metadata values, swap in the values for things like the stages name element, and deploy the resulting customized flow.

Good hunting.

New Wiki Page on Flow Stages

We’ve added a new wiki page covering Flow Stages. As is the case with most buildouts of the wiki, this isn’t about a bunch of new content but more of an aggregation of all of the known existing good content on a single focused topic page. As such, everyone should feel encouraged to add good links to wiki pages like this one. The link at the bottom of the page explains how to do it, and it’s totally safe: all edits are put in a review queue so you don’t have to worry you’ll mess anything up.

From ForcePanda: The first Invocable Action that can perform SOQL on any kind of input

Narender builds on his “world’s first” blog post on invocable actions that use the new Spring ’20 generic SObject support with a new post that shows, for the first time, an action that carries out SOQL and can be used declaratively in any object scenario.

The heart of his action is this line:

string query = 'Select '+ queryParams[0].fieldsToQuery + ' FROM ' + queryParams[0].objectApiName + ' LIMIT ' + queryParams[0].numberOfRecords;

As you can see, that’s a SOQL query. Now you’ve always been able to do that with a Flow invocable action, but you always have had to get into the Apex code and specify the exact object you wanted to use. For example, when I posted this tutorial on injecting advanced soql into flows, you can see that my code specifically declared User and Contact variables.

But Narender’s code doesn’t have to do that. And that means that you can take his action and deploy it declaratively against any kind of input.

ForcePanda’s example, powerful though it is, only scratches at the surface of the powerful SOQL actions that will be packaged up into building blocks once Spring ’20 ships. And eventually, we’ll start seeing those actions with friendly configuration UI’s, powered by Custom Property Editors.

A New Datatable Component that supports ALL Custom Objects from Tigerface Systems

Tigerface has posted a free version on AppExchange of their upcoming Datatable solution. The thing that really jumps out at me is that they’ve addressed the core limitation of the existing unpackaged datatable flow screen components: its inability to support more than a modest set of standard object types.

Tigerface appears to be solving this via metaprogramming: they actually generate the component on-demand to fit a particular specified object type. That’s a clever approach.

Comment thread here: https://success.salesforce.com/0D53A00004inprz

Navigate Everywhere – Flow Action


This action provides a range of navigation choices available in a single, straightforward navigation action for Flow. It provides support for navigation from a flow to:

  • a record page (in edit or view mode)
  • a new record form for an object (Note that you can use flow to pass initial values to the form)
  • a list view (object home page)
  • a web page
  • a related object list view
  • an App page
  • a custom Tab page
  • a named page (examples include ”home”, “today”, “chatter” and a variety of community named pages)
  • a Knowledge page

IMPORTANT: This action only works with Screen Flows because it’s a Local Action that requires the presence of a browser session. Autolaunched flows can be launched from a browser but are optimized for server-side operation and can’t do browser redirects.

IMPORTANT: Note that this navigation component is still constrained by some basic limitations constraining navigation in Flow Builder. This will work in normal lightning experience flows, including flows launched from Quick Actions, but will not work when run from inside Flow Builder or via a Custom Button. It will not work from Visualforce pages.

Supported Destination Types

Destination Type = ‘Object’

Will navigate to a New record form or a List view. Note the use of DestinationActionFilter to pass in the name of a specific list view.

Setting Initial Values
When using DestinationType = ‘object’, and DestinationAction=’new’, passing a json string of ‘{FieldAPIName : value, FieldAPIName : value}’ will default those fields to the value.

Example:
To navigate to a new Contact page with defaulting the FirstName and the LastName fields via a formula field in the flow:
DestinationType = object
DestinationName = Contact
DestinationAction = new
defaultVals = {!formulafield}


{!formulafield} =
‘{“FirstName”: “‘ & {!firstname} & ‘”, “LastName”: ” ‘ & {!Last_Name} & ‘”}’

Destination Type = ‘Record’

Navigates to a specific recordId in either view or edit mode.

Set Destination Action to ‘edit’, ‘view’, or ‘clone’.

Don’t use this Destination Type if you’re trying to create a new record (Use Destination Type = ‘Object’). DestinationActionFilter is not used.

Destination Type = ‘App’

Navigates to an app. For DestinationName, use either the appId or appDeveloperName to the appTarget. The appId is the DurableId field on the AppDefinition sObject. The appDeveloperName value is formed by concatenating the appโ€™s namespace with the developer name. To find the appโ€™s developer name, navigate to the App Manager in Setup and look in the Developer Name column. For standard apps, the namespace is ‘standard__’. For custom apps itโ€™s ‘c__’. For managed packages, itโ€™s the namespace registered for the package.

DestinationAction and DestinationActionFilter are not used.

Destination Type = ‘URL’

Navigates to a specific url. Use the DestinationURL field.

DestinationName, DestinationAction, and DestinationActionFilter are not used.

Destination Type = ‘NamedPage’

Navigates to a specific Named Page. Use the DestinationName field.

In Lightning Experience and the Salesforce mobile app, possible values are:

  • home
  • chatter
  • today
  • dataAssessment
  • filePreview

In Communities, the value for pageName is the URL value for a supported page. For instance, the default URL value for the Account Management page is /account-management, so the value for pageName would be account-management. The value of home is reserved for the landing page of any community in your org.

Supported pages in Communities are:

  • Home
  • Account management
  • Contact support
  • Error
  • Login
  • Top Articles
  • Topic Catalog
  • Custom pages

DestinationAction, and DestinationActionFilter are not used.

Destination Type = ‘tab’

Navigates to a specific tab. Use the DestinationName field and provide the unique name of a CustomTab. Visualforce tabs, web tabs, Lightning Pages, and Lightning Component tabs are supported.

DestinationAction, and DestinationActionFilter are not used.

Destination Type = ‘knowledge’

Navigates to a knowledge page. Destination URL is required. The value of the urlName field on the target KnowledgeArticleVersion record. The urlName is the article’s URL. DestinationName is ignored for Communities but required otherwise. Use the ArticleType API name of the Knowledge Article record for DestinationName.

DestinationAction, and DestinationActionFilter are not used.

Destination Type = ‘relatedlist’

Navigates to a related items page. Requires 1) a RecordId 2) a DestinationName like Case, 3) a RelationshipName like CaseComments and 4) a DestinationAction (which here has to be view)

Note that the Relationship Name of a related list can be a little nonintuitive. For example, suppose you want to navigate to the Opportunity Products list for an Opportunity. The relationship name is OpportunityLineItems, which you probably wouldn’t guess. Find the relationship name by going to the child object in object manager and inspecting the Lookup field that does a lookup to the parent object, as shown below:

Launching from a Utility Bar?

Check out https://unofficialsf.com/minimize-the-window-when-a-utility-bar-flow-is-finished-evan-ponter/

Attributes

AttributeTypeNotes
DestinationTypeStringAllowable values include ‘object’
DestinationNameStringWhen DestinationType is ‘object’, this must be an object name like ‘Account’ or ‘MyObj__c’.
DestinationActionStringWhen DestinationType is ‘object’, supported values are ‘list’, ‘new’, and ‘home’.
When DestinationType is ‘record’, supported values are ‘view’, ‘edit’ and ‘clone’
DestinationActionFilterStringWhen DestinationType is ‘object’ and DestinationAction is ‘list’ or ‘home’, this allows the specification of a specific list view by name. Example ‘mycustomlistview’
Destination URLString
Relationship NameStringUsed with Destination Type = relatedlist
Destination Record IdString
defaultValsStringUsed with Destination Type = ‘object’ to pass initial field values. format: {!formulafield} =
โ€˜{โ€œFirstNameโ€: โ€œโ€˜ & {!firstname} & โ€˜โ€, โ€œLastNameโ€: โ€ โ€˜ & {!Last_Name} & โ€˜โ€}โ€™

Install

Unmanaged 1.1.1 – 10/20/21 bug fix – (Production / Sandbox)

Installation troubleshooting

Old Versions

Unmanaged 1.1 – 10/4/21 Adds the ability pass initial values to a New record form.

9/2/21 Alex Edelstein – package tweak

Unmanaged Package 1.0.4 – Production
Unmanaged Package 1.0.4 – Sandbox

5/25/21 – Eric Smith – Corrected the logic in the test for correct attributes for the relatedList mode

Unmanaged Package 1.0.2 – Production
Unmanaged Package 1.0.2 – Sandbox

Unmanaged Package 1.0.1 (small error message improvements)

Unmanaged Package 1.0

View Source

Source

Get a Layout’s Field Names – ‘Get Layout Fields’ Action

With the publication of the RecordDetail flow screen component, it became easy to get flow to show any list of field names you choose to give it. In many use cases, you might want to leverage your existing Layouts, particularly in situations where you’ve customized layouts on a per-record-type basis. Other recent tools make it easy to let users select record types and obtain layout id’s. This action takes a Layout Name and Object Name and returns a CSV string of the layout’s field names. To see this action in action, check out this video.

Inputs

AttributeTypeDescription
Layout NameStringexample “Account (Marketing) Layout” (don’t include the quotes)
Object NameStringexample “Account” (don’t include the quotes)

Outputs

AttributeTypeDescription
layoutFieldsCSVStringComma-separated list of layout fields

Installation

Version 1.2.4 Unmanaged

Old Versions

Version 1.2.3 Unmanaged

Source

source.

Get the Layout Corresponding To a Specific RecordType/Profile Combination – ‘Get Layout By Profile and Record Type’ Flow Action

Layouts often differ substantially from recordType to recordType and from profile to profile. This action takes a recordTypeId and a profileId and returns that combination’s current LayoutId. One use of this is dynamically generating flow screen layouts with the RecordDetail flow screen component. To do this, after using this action to retrieve a LayoutId, use the GetLayoutFields action to retrieve the list fo field names from that layout. You can then pass the list of field names to RecordDetail to generate a customized record detail right in your Flow screen that maps to the layout. To see this in action, check out this video.

Inputs

AttributeTypeDescription
recordTypeIdStringThe ID of a recordType
profileIdStringThe ID of a profile. Note that you can quickly generate this in Flow by creating a formula of $User.profileId

Outputs

AttributeTypeDescription
layoutIdString

Installation

Source

grab the source.

Quick Choice – Improved Picklists and Radio Buttons for Flow

This Post was most recently updated on: 1/11/25

See below for notes on reactivity


Current Version:ย 2.46 (FlowScreenComponentsBasePack v3.3.10 or later)

4/15/25 – Eric Smith – Version 2.46

  • Support a Picklist field for Visual Cards

12/20/24 – Eric Smith – Version 2.45

  • Support default values for dependent picklists on initial screen load

6/20/24 – bjvndrwalt

  • Clear selected picklist values in dependent picklist when a value in the controlling picklist changes

1/16/24 – Eric Smith – Version 2.44

  • Implemented workaround for Spring ’24 bug with dependent picklists and other reactivity issues

12/12/23 – Eric Smith – Version 2.43

  • Added reactivity for the Record Type Id

12/8/23 – Eric Smith – Version 2.42

  • Clear the currently selected value if the options change on a reactive screen
  • Allow “Add a ‘None’ Choice” option for all valid picklist methods
  • Added clarification to an error message that could appear if the component has conditional visibility on a screen that can be revisited
  • Fixed the “Need a valid Input Mode. Didn’t get one.” error introduced in the prior release

Quick Choice is a flow screen component that provides some features that aren’t available in the current picklist and radio button implementation in Flow Builder.

Features that it provides:

  1. Accepts as an input a pair of string collections.
  2. Can accept a default value that’s dynamically determined by your Flow
  3. Can generate picklists from existing picklist fields with optional filtering based on record type
  4. Supports ‘None’ Value and Requiredness
  5. Choices can be formatted as Radio Buttons, Picklist, or Visual Cards
  6. Visual Cards can be displayed with or without Icons or Images
  7. Visual Cards can be displayed in single or dual columns
  8. Specify the width of the picklist.

Note: the rest of this post focuses on the Quick Choice component. If you are interested in learning more about the initial example shown in the above video, where different record forms are displayed based on Record Type, take a look at the posts about Record Detail, Get Layout Fields and Get Layout By Record Type and Profile, and Get Record Type by Object

Quick Choice supports both picklists and radio button groups, set by passing in a value for Display Mode. For this document, we’ll always use “Picklist”. There’s no support for multiple select. If you need that, consider the Dual List Box flow screen component.

Creating Choices from String Collections

Use String Collections as your inputs by setting Input Mode to “Dual String Collections”. Pass in one collection for Labels and one for the underlying values (A typical use case for this is when you want your user to see a list of friendly labels, but you need to make sure that you can get the recordId of the selected label.)

Example: You want to take a collection of Account records and use their Name fields as labels and ID fields as values. Note that there’s a convenient utility action ‘Extract Strings from Collections’ that is available in the Collection Processors extension.

Example: You want your flow to let the user choose a record type from a picklist and then display the layout corresponding to that record type (This is demonstrated in the video above). The Quick Choice package includes several utility actions that make this easy. You first start out with the GetRecordTypeInfobyObject action, which returns separate collections of recordTypeNames and Ids. You then use those as inputs to a QuickChoice control. When the user makes their choice, you use a couple of additional utility actions to extract the Layout fields for the layout that corresponds to the combination of the selected RecordType and the running user’s profile. The layout fields are then passed to the new RecordDetail flow screen component.

Tip: If you are starting with a collection of SObjects instead of a collection of Strings, you can use the ExtractFieldFromCollection flow action (provided in the same package as SmartChoice) but you’ll need to modify its Apex, swapping the references to “Account” for your chosen SObject.

Tip: The ‘Get Layout ID’ action is found here. It is not packaged but you can install its Apex into your org directly.

Creating Filtered Choices from Picklist Fields

Many orgs take advantage of the ability to create record-type-specific sets of picklist values for picklist fields like Account.Type and Account.Rating. Flow already enables the easy creation of Picklist Choice Sets, which point at an existing picklist field. But you can’t filter a Picklist Choice Set on a specific Record Type. Quick Choice allows you to do that.

Start by setting the Input Mode to “Picklist Field”.

Pass in strings for Object Name and Field Name. (You can also use Object and Field picker)

Pass a record type ID in. If you don’t, the component uses the ID of the standard “Master” record type ID, which will result in no filtering. This package includes a useful utility function called GetRecordTypeInfoByObject that will return the record type Id’s and Labels for a given object type name. The video above shows how you can use QuickChoice first to let the user select a record type and then to show a set of filtered picklist fields. Learn more about using a Flow Action to retrieve the available record types so your user can pick the one they want.

Displaying Choices as Visual Cards

Set the Display Mode to “Card” and the Input Mode to “Visual Text Box” .

Pass in a collection of Strings in Choice Labels for the visual card headers, a collection of Strings in Choice Values for visual card descriptions and optionally a collection of icon and/or image references in Card Mode – Choice Icons for visual card icons.

If you are displaying icons, set the Card Mode – Include Icons in Display Box? parameter to True and set the Card Mode – Icon Size parameter.

The visual cards are displayed in a single column by default. Set the Card Mode – Number of Display Box Columns (1 or 2) parameter to 2 to display dual columns.

Visual Cards without Icons

Visual Cards with Icons

Dual Column Visual Cards


Single Column Visual Card sizes can be responsive.


Requiredness Support

You can set the Required field to $GlobalConstant.True. If you do, Flow will prevent screen transition if the user selects ‘None’ or makes no selection at all.

Controlling the ‘None’ Choice

By default, there will be no “None” Choice. To add one, set the input “Allow None To Be Chosen” to $GlobalConstant.True.

Multiple QuickChoices on the Same Screen

When including multiple Radio Button and/or Visual Card inputs on the same screen, you must provide a unique value for Master Label for each of the components.

Multiselect Picklists

Not supported directly with this component, but check out Dual List Box.

Reactivity

When providing a default value for a controlling picklist, assign it to a flow variable such as vDefaultValue and then use a reactive formula to reference the controlling value of the dependent picklist. This will use the default as the contolling value until a new value is selected in the controlling picklist.

BLANKVALUE( {!ControllingQC.value}, {!vDefaultValue} )

Currently, a default value is not supported for a controlled picklist.


Recent Improvements

7/23/23 – Eric Smith – Version 2.41

4/23/23 – Eric Smith – Version 2.40 (ScreenComponentsBasePack v3.2.0 or later)

  • Added an attribute for a Help Text hover to appear next to the Master Label for all input types

3/29/23 – Eric Smith – Version 2.39

  • Fixed dependent picklist bug (CB_TRUE not defined)

3/25/23 – Eric Smith – Version 2.38

  • Refactored to work with the Reactive Screen Beta for Dependent Picklists. It had previously worked with the Pilot but failed when switching over to the Beta.
  • Added a new option to allow the body of a Visual Card to be displayed as Rich Text, including pictures.

11/08/22 – Andy Haas – Versions 2.37

  • Updated the cardSize to allow the height of the card to contain the content

10/12/22 – Eric Smith – Version 2.36

  • Fixed backwards compatability bug from 2.34 when no controlling value attribute is provided for a controlled picklist field

6/2/22 – Eric Smith

  • Adjusted the bottom spacing to match that of all the standard flow screen input components
  • Fixed a bug that caused an error when using an empty Label collection with Visual Cards

3/29/22 – Eric Smith – New Controlling Value attribute for Picklist Fields. This can be used for dependent picklists by passing the output of one QuickChoice component to the input of another QuickChoice component in an org where the Reactive Screens pilot is enabled.


Demonstration Video of Dependent Picklists with QuickChoice


New! This tutorial video on using Quick Choice, courtesy of Helpful Salesforce Admin

QUICK CREATE RECORDS WITH QUICK CHOICE FROM USF
Allow your users to create records quickly, directly from the home page. (From SFDC Bailey, 9/19/23)

Reference

General Attributes

AttributeTypeNotes
Master LabelStringThe main label for the picklist or radio button group (Must be unique for each component on the same Flow screen)
Help TextStringOptional help text to appear as a hover next to the Master Label
Display ModeEnumEither “Visual”, “Picklist” or “Radio”, depending on which control you want
Input ModeEnum“Single String Collection”, “Dual String Collections”, “Picklist Field”, or ” Visual Text Box ” are currently supported
RequiredBooleanWill prevent transition if set to {!$GlobalConstant.True}
ValueStringThe selected value. This can be passed into QuickChoice, allowing you to set the default value dynamically.
Allow None To Be ChosenBooleanSet this to true to include a None choice. (For Input Mode “Picklist Field” only)
Set Width in PixelsIntegerSet the width of the component for Picklist & Radio Buttons (Default 320 pixels)
allValuesString[]The complete set of values provided to the user. (V1.3+)
allLabelsString[]The complete set of labels provided to the user (V1.3+)
selectedLabelStringThe selected Label (V1.3+)

Additional Attributes When Using Input Mode = “Single String Collection”

AttributeTypeNotes
Choice ValuesString CollectionThe values of your choices (The same collection will be used for Labels and Values)
The selected Label/Value will be returned by the component

Additional Attributes When Using Input Mode = “Dual String Collections”

AttributeTypeNotes
Choice LabelsString CollectionThe labels of your choices
Choice ValuesString CollectionThe values of your choices (should be unique)
The selected Value will be returned by the component

Additional Attributes When Using Input Mode = “Visual Text Box ”

AttributeTypeNotes
Choice Titles (Labels)String CollectionThe labels of your choices (should be unique)
The selected Label will be returned by the component
Choice Descriptions (Values)String CollectionThe values of your choices (This is provided as extra descriptive text in the visual card)
Card Mode – Choice Icons
(OPTIONAL)
String CollectionMix and Match either:
– Icon names formatted as icon_type:icon_name (Example “utility:attach”)
See complete selection at https://lightningdesignsystem.com/icons/
– Image names formatted as filename.ext (Example “astro.png”)
Referenced images must be included in a ZIP file referenced by a Static Resource* named Quickchoice_Images. Note that this Static Resource is created by the package and you can edit it and upload a new zip file.
Card Mode – Include Icons in Text Box?BooleanDisplay the provided icons in the visual card
Card Mode – Icon SizeStringOptions include x-small, small, medium, or large. This value defaults to medium.
Card Mode – Number of Textbox Columns (1 or 2) String1 or blank (default) for a single column or 2 for dual columns
Make Card Size ResponsiveBooleanThe default is False and the CPE will only display this selection when Visual Cards and Single Column are selected.
Use Rich Text for Descriptions?BooleanWhen checked, you can provide HTML formatted text to display as Rich Text in the body of the visual card. One use would be to use Text Template variables for each of the Choice Descriptions.

Additional Attributes When Using Input Mode = “Picklist Field”

AttributeTypeNotes
Object Name (for Picklist Field)StringExample: “Account” (this component no longer uses the combined “Account.Type” as an input)
Field Name (for Picklist Field)StringExample: “Type” (this component no longer uses the combined “Account.Type” as an input)
Record Type IdStringThis will default to the id of the Master record type
Is this a Dependent Picklist?BooleanCheck this box if this is a dependent picklist and you will be defining a controlling value.  The controlling value can either be a picklist field value or a checkbox field value. That value can come from another component on the same flow screen when the Reactive Screen functionality is enabled.
Controlling Value (Picklist Field)StringIf the contolling field is a Picklist, reference it here. Provide a value for Controlling Value Picklist or Controlling Value Checkbox but not both.
Controlling Value (Checkbox Field)BooleanIf the contolling field is a Checkbox, reference it here. Provide a value for Controlling Value Picklist or Controlling Value Checkbox but not both.

*NOTE: Static Resource
The package includes a Static Resource named Quickchoice_Images. To access your own images, create a ZIP file containing all of the images you want to reference and then, in Setup, Edit the Quickchoice_Images Static Resource and reference your ZIP file with the “Choose File” option. To learn more about Static Resources and creating ZIP files, see the Instructions for my ersQuickSwitchApp component.

Install

Current Version

This component is part of the Flow Base Packs package libraries.

View Source

Source

Release Notes:

6/20/24 – bjvndrwalt

  • Clear selected picklist values in dependent picklist when a value in the controlling picklist changes

1/16/24 – Eric Smith – Version 2.44

  • Implemented workaround for Spring ’24 bug with dependent picklists and other reactivity issues

12/12/23 – Eric Smith – Version 2.43

  • Added reactivity for the Record Type Id

12/8/23 – Eric Smith – Version 2.42 (ScreenComponentsBasePack v3.3.0 or later)

  • Clear the currently selected value if the options change on a reactive screen
  • Allow “Add a ‘None’ Choice” option for all valid picklist methods
  • Added clarification to an error message that could appear if the component has conditional visibility on a screen that can be revisited
  • Fixed the “Need a valid Input Mode. Didn’t get one.” error introduced in the prior release

7/23/23 – Eric Smith – Version 2.41 (ScreenComponentsBasePack v3.2.5 or later)

  • Fixed default value being passed as output for reactivity
  • Added reactivity for choiceLabels, choiceValues & choiceIcons input attributes (updates require a change to choiceValues)

4/23/23 – Eric Smith – Version 2.40 (ScreenComponentsBasePack v3.2.0 or later)

  • Added an attribute for a Help Text hover to appear next to the Master Label for all input types

3/29/23 – Eric Smith – Version 2.39

  • Fixed dependent picklist bug (CB_TRUE not defined)

3/25/23 – Eric Smith – Version 2.38

  • Refactored to work with the Reactive Screen Beta for Dependent Picklists. It had previously worked with the Pilot but failed when switching over to the Beta.
  • Added a new option to allow the body of a Visual Card to be displayed as Rich Text, including pictures.

11/08/22 – Andy Haas – Versions 2.37

  • Updated the cardSize to allow the height of the card to contain the content

10/12/22 – Eric Smith – Version 2.36

  • Fixed backwards compatability bug from 2.34 when no controlling value attribute is provided for a controlled picklist field

Version 2.35 – 6/2/22 – Eric Smith

  • Adjusted the bottom spacing to match that of all the standard flow screen input components
  • Fixed a bug that caused an error when using an empty Label collection with Visual Cards

Version 2.34 – 3/29/22 – Eric Smith – New Controlling Value attribute for Picklist Fields. This can be used for dependent picklists by passing the output of one QuickChoice component to the input of another QuickChoice component in an org where the

Version 2.33 – 7/3/21 – Eric Smith
Added an * next to the Label for Visual Cards when the Required attribute is set to True

Version 2.32 – 1/28/21 – clifford-fra
Added support for responsive sizing for single column Visual Cards

Old Versions (not recommended)

Version 2.31 Unlocked – 9/14/20 – Eric Smith
Before installing this component you need to have on your org the Flow Base Components support package, version 1.2 or greater.
Install that here.

Version 2.2 Unlocked – 9/2/20 – Eric Smith

version 2.1 Unlocked

Version 2.0 Unlocked 

Version 1.4 Managed 6/5/20

Version 1.4 – 4/19/20 – Eric Smith

Version 1.3

3/2/20 Eric Smith
v1.27 Added ability to display both images & icons on visual cards (Thanks again to clifford-fra for the update)

Unmanaged v1.27 (Production/Developer)
Unmanaged v1.27 (Sandbox)

2/6/20 – v1.26 Display a Visual Card as preselected when passing in a default value (Thanks to clifford-fra for the fix)

Unmanaged v1.26 (Production/Developer)
Unmanaged v1.26 (Sandbox)

Unmanaged V1.24

See Release Notes

1/16/20Eric Smith
v1.23 – Added an option to display the visual cards in a single or dual columns

Managed V1.23 (Production/Developer)
Managed V1.23 (Sandbox)

1/3/20 -alexed
v1.20 – changed actions to global from public to make them visible in flow builder.

12/31/19Eric Smith Enhancements
v1.17: Added visual text box selection with or without icons. Fixed error handling when Required is set to True

12/29/19
v1.13: Fixed bug with defaults on picklist control. Added flag to allow or disallow a ‘None’ choice

Release Notes

Version 2.3 – Eric Smith – 9/14/20
Fixed Visual Card selection bug when no Master Label is provided

Version 2.2 – Eric Smith – 9/2/20
Includes a new option to sort the values in the Picklist

Version 2.1 – Now includes a CPE (Custom Property Editor)

Create a Flow Menu for System Admin Tools

System Admin Tools Menu

Over time I have created a number of specialized Flows in my org for System Admins to help fix records or unwind certain processes.  I find these are a much safer way of keeping the data clean rather than trying to remember all the manual steps necessary to update records correctly.

To make it easier to select and run these specialized Flows I wanted to come up with a way to provide a menu of these tools to select from.  On unofficialsf.com, I found a simple Flow Screen Lightning Web Component that could display a list of Flows in the org and return the API Name of the selected Flow.

The first thing I did with this component (flowPickerFSC) was to enhance it by adding some additional attributes to make it more powerful and user friendly.  I added labels and help text for the configuration attributes, created a filter for the flow search, sorted the displayed list, updated the documentation and created install packages for Production and Sandboxes.

One way to use this component to run a flow is to add the OpenURL Flow Action component to the calling flow and pass the URL of the selected flow to it.  I show how this can be done on the documentation page for flowPickerFSC.


For my Admin Tools Menu I wanted to run my flows in place in a pop-up modal window.  Salesforce Labs has a nice app for this on the App Exchange called Launch Flow in Modal.

With just a few minor tweaks to this component, I was able to embed the Flow Picker LWC and use that to select and set the flow to be loaded in the pop-up modal window.

With these changes, my new component is ready to add to any Lightning Home, App or Record page.

  1. – Any random text is OK here as the Flow Name will be reset by the LWC
  2. – This is the standard Salesforce color for Brand (Dark Cerulean)

Here is the component in action:

Hereโ€™s hoping this inspires you to try something like this in your own org.


Follow these links for Installation and Source Code:

Source Code

flowPickerFSC

launchFlowModal

Install Package

This application requires the FlowActionsBasePack to be installed first

Version 1.4 – Eric Smith – 01/02/21

Production/Developer

Sandbox

Release History

Version 1.3 – 12/20/19

Lightning Web Component Bundles: flowPickerFSC

Aura Component Bundles:  ccp_launchFlowModal, ccp_renderFlow

Apex Classes: FlowListController, FlowListControllerTest

Production

Sandbox



Eric Smith – December 2019

How to create a Map collection in Flows by Narender Singh

Narender Singh form ForcePanda wrote a two blog series about using map collections in flows. The second blog makes good use of the new generic sObject support in flows coming in the Spring ’20 release

Part 1: https://forcepanda.wordpress.com/2019/12/17/how-to-create-a-map-collection-in-flows-part-1/

Part 2: https://forcepanda.wordpress.com/2019/12/18/how-to-create-a-map-collection-in-flows-part-2flow-map-methods-spring20delight/