Skip to content

SFDC-Assets/rc-flow-components

 
 

Repository files navigation

sfdx-flow-components


RC_FlowButton

This is an Aura Lightning component button that when clicked can:

  1. Launch a Flow, inline or within a modal dialog.

Within another Lightning component:

<c:RC_FlowButton buttonLabel="Submit" variant="BRAND" flowToLaunch="Create_Contact" showFlowInModal="true" />

On a Lightning page:

RC_FlowButtonApp

  1. If the button is within a Flow screen, it handles the Flow navigation to replace the default footer buttons "Next", "Back", "Pause" and "Finish".

Flow navigation button

Flow navigation button

Flow navigation buttons

Flow navigation buttons

  1. If the button is within a Flow screen, it can also be used to automatically launch a subflow without displaying the button at all. Then when the subflow is completed, one of the flow actions ("Next", "Finish") is performed to continue the parent flow.

Flow Router - Subflow Screen

Samples of using this component are in the RC_FlowButtonApp Aura application and Flow Components app.

RC_FlowButtonApp

Flow Components

Launch Flow In Modal

Launch Flow Inline

If the button is placed on a record detail page, the recordId will be passed to the Flow.

Pass recordId from record detail page

Pass recordId from record detail page

Dynamically launch subflows. Two example flows for doing this are the "Flow Router" and "Case Status Router".

Flow Router

Flow Router

Flow Router

The "Case Status Router" flow is configured on the Case record page.

Case Status Router

Case Status Router

Case Status Router


Development

To work on this project in a scratch org:

  1. Set up CumulusCI
  2. Run cci flow run dev_org --org dev to deploy this project.
  3. Run sfdx force:user:permset:assign -n flowComponents -u sfdx-flow-components__dev to assign the scratch org user to the permission set
  4. Run cci org browser dev to open the org in your browser.

To make this project a dependency in another CumulusCI project, point to the metadata zip file in your cumulusci.yml like this:

project:
    dependencies:
        - zip_url: https://github.com/SFDC-Assets/rc-flow-components/raw/master/archive/master.zip
          unmanaged: True

Packages

No packages published

Languages

  • JavaScript 81.7%
  • RobotFramework 10.8%
  • Shell 7.5%