Skip to main content

Due to the limitations of Action buttons on records that launch screen flows, some years ago I built a "Screen Flow Switchboard".  It is a simple screen flow on a lightning page (not a record page) that shows a set of buttons, each of which launches a flow when you press it.  Our org has a number of flows that perform non-record-specific tasks, so a centralized place for these buttons is helpful to staff. 

 

However - there is no native flow element for building this sort of UI.  Dynamic forms have buttons but can't launch screen flows.  You can place a flows on a lightning page, but those flows run as soon as the page is visited.  I need my flows to launch only after the user presses the button. 

 

My current solution uses the unofficialsf integration called "Flow Button Bar", which works, but is awkward and of course not supported. 

 

I am looking for a better solution.  Any ideas? 

 

(I suppose I could add a screen element to the start of each flow I want to call that simply says "Click the Next button at lower right to start the xyz flow"...but it just seems like my use case might be common enough that I'm missing a better way.) 

 

#Flow  #Salesforce Admin

4 respuestas
  1. Hoy, 15:56

    Hi John, 

     

    Per Salesforce's own documentation on Predefined Field Values for Quick Actions: "A predefined field value for a lookup field must be a reference to a record Id field or another lookup field." The predefined-value formula editor on a Quick Action only accepts Id/lookup-type field references for lookup fields, it doesn't expose Custom Metadata Type fields as valid merge field options in that specific context, even though CMDT works fine in regular formula fields elsewhere in the org. That's exactly why you got "does not exist," the formula editor there simply doesn't recognize CMDT as a valid source for a lookup predefined value, regardless of your CMDT being perfectly valid. 

     

    Official reference:

    https://help.salesforce.com/s/articleView?language=en_US&id=sf.predefined_field_values_notes.htm&type=5

     

     

    Given this limitation, and since you're already moving toward the Visual Picker + Screen Flow approach for your switchboard, it's worth solving the "default Primary Campaign Source from CMDT" problem inside a Screen Flow's Create Records element instead of a Quick Action: 

     

    1. In your Screen Flow, add a Get Records element to query your Custom Metadata Type record. 

    2. Use an Assignment or directly reference the CMDT field in your Create Records element for the Opportunity, Flow's Create Records doesn't have the same restriction, you can reference any accessible field, including CMDT values, when building the record to insert. 

     

    This sidesteps the Quick Action limitation entirely and keeps everything native, no Aura/LWC workaround needed for this particular piece. Combined with the Visual Picker switchboard, this gives you a fully declarative solution for both original problems.

0/9000