Lightning Components to Extend your Flows

We’ve created a Package to extend your Lightning Flows using Lightning Components. We’re working on getting the full documentation for you and posts about each of the Lightning Components. Feel free to download the package from the AppExchange, we’ll add the new posts as soon as possible!  https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FvN3wUAF

Lightning Component – Redirect Flow – Use inside a Lightning Flow to dynamically redirect the Flow to any URL you set or allow Users to click on a Button to redirect them. This includes redirecting Users to a record that was created inside the Flow, or adding URL variables, such as with a Conga Composer button, based on User selections inside the Flow.

Lightning Component – Run Flow Button – Use on a Lightning Page to create a button that when clicked, will run a Lightning Flow. Instead of the Flow running automatically when the page is rendered like the standard Flow Component, this will only render the Flow when a User clicks the button. Can be combined with Component Filters to only show the button in certain situations.

Apex Action – Unlock Record – Use inside Process Builder or Lightning Flow to unlock a record. Helpful for unlocking a record after an outside action has happened, such as a Quote being declined in an e-signature process, allowing a User to then edit the Quote again and resend for signature from the client.

Apex Action – Lock Record – Use inside Process Builder or Lightning Flow to lock a record, no standard approval process required. Helpful for building custom approval workflows with record locking at the end when the standard approval workflows are not robust enough.

Lightning Component – Locked Record Notifier – Use on a Lightning Page to notify the User if a Record is locked. Enter in your custom message to the User if the Record is locked in the Lightning App Builder. Lightning Component will not display if Record is unlocked.

Apex Action – Get Available Record Types – Use inside Lightning Flow to get the available Record Types for a User, based on the Object. Default Record Type Id for that User is sent back in addition to the List of Record Types allowed for the User. Use with Record Type Picklist Lightning Component to display Record Type selection to the User in a Lightning Flow.

Coming Soon – Lightning Component – Record Type Picklist – Use this Lightning Component inside a Lightning Flow Screen to display Record Types to the User for selection. Use in conjunction with the Get Available Record Types Apex Action to show a User the Record Types they are allowed to create.

10 comments

  1. This sounded like a great solution for re-directing the finish location on a flow to a newly created record + easy to set up, The trouble is I get an error when I use this as the last step on the visual flow and I have not found much in regards to solving this.
    Error =
    FLOW_ELEMENT_ERROR| This flow contains local actions, so this flow runs only in Lightning runtime.

    Flow is called from a visualforce page button which has no finishlocation option and is being run using Lightning version of Salesforce and the url path is lightning specific. Why would this error happen with SF Lightning??

  2. In follow up to my last msg… on runtime error with this redirect component….I notice when a user advice/input screen displays during the flow that it is in Classic runtime style hwich fits in with the error on your component. The flow is being run from a VF button on a lightning page. salesforce help says…
    Flows that run from a Lightning page, flow action, or custom Aura component always use Lightning runtime. Any advice on how I can get this flow to work with your component?

    1. Hi Scott,

      Any way that you could launch it from a flow button (part of the package) instead of a Visualforce page button? I’m not too sure as to how the local lightning actions work inside of a visualforce page.

      Rich

    2. Hi Scott,

      Try using our flow button instead of VF. Even though your VF page button is in Lightning, the flow isn’t running on Lightning in this instance, it is running inside the VF container.

  3. Excellent features and am excited to use. I have tried the Run flow button lightning component with two of my screen flows, but when it seems when the flow reaches an Update record or Create record element it restarts the flow instead of performing the action and continuing the flow.

    The flows work correctly as normal Flow Screen components on the page but i’d like to use the button. Any ideas on what could be going wrong?

    1. Hi Patrick,

      I’ve never experienced that before. Is this happening in Summer 19 or Winter 20? Are you getting any error messages? If you can post a screen shot of the flow builder, that might help troubleshoot.

      1. Hi Rich, currently not letting me post a screenshot here but the flow is a simple screen flow with:

        Get Records -> Get Records -> Screen -> Create Records -> Email Alert

        Currently testing in a Developer sandbox on a winter 20 preview. I’ll try a partial copy sandbox still on a spring 19 to see if i can get it to work. No error messages on the flow, just restarts to the first screen component each time.

      2. Hi Patrick,

        Flow does restart after it finishes, that’s one of the ways it works, which is why there is the redirect flow core action.

        You might not receive an email in sandbox if deliverability is turned off. If it is off, try turning it to all email instead of system and run the flow again. If it sends the email, then everything is running correctly. I would suggest adding the redirect flow core action at the end and put the URL to the original record, it essentially runs the flow and then refreshes the page.

  4. Hi Rich, I think i may have found whats missing but not sure on the solution. When adding a screen flow to a lightning page you can select to pass the record into into a variable designated for input in the flow – which i do have set up for the screen flow. When run the flow through the button, there is no option to pass the record id into the flow variable. Is that available elsewhere with the button feature?

    1. Hi Patrick,

      Flow with Salesforce has some automation around that. For your input variable for the flow, use “recordId”, with the only the i capitalized. It should pass the record Id to that variable automatically as long as it is available for input. I’ll check the instructions again and update that note if it is not in there.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.