Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Flow Builder is a declarative interface which is used to create individual Flows. It can be used to build code-like logic to automate complex business processes without programming.

How to Execute a Flow Using a Button

Buttons, links, and actions are standard features available in all Orgs and can be easily customized by an and can be customized by an administrator without the need for any coding. Custom buttons and links can be used to direct a user to a URL or to trigger OnClickJavaScript or Visualforce actions.

To activate a flow, you can use a custom URL button in an object and fill the button's text field with the URL of the flow.

url_flow(?optional_parameters)

How to Use Billing Run Initiator via a Custom Invoice URL Button

Challenge:

You will see how to trigger invoice generation for a Pre-Invoice record using a button.

Learn how you can generate an Invoice for a Pre-Invoice Record with a Custom URL Button: You will see how to create a button that triggers the generation of an invoice for a pre-invoice record.

Creating the Screen Flow

  1. To get started, enter "Flows" into the Quick Search Bar and select it from the Process Automation section.

  2. Create a new flow and choose the screen flow type.

  3. The flow will consist of a text variable and three screen elements: a Welcome Screen, a Billing Run Screen (where the Billing Run Initiator Component will be activated), and the Final Screen.

Flow Variable

To begin create a new text variable. Follow these steps:

  1. Under Toolbox, select Manager and click on New Resource.

  2. Input the following details:

    • Resource Type - Variable

    • API Name - recordId

    • Data Type - Text

    • Allow multiple values (collection) - Uncheck

    • Available for Input - Check

  3. Click Done.

Creating the Welcome Screen

To set up the Welcome Screen with a link, follow these steps:

  1. Add a new screen element to the flow.

  2. Configure this screen element to contain a Display Text.

  1. Within the Display Text, create a link that will open the Pre-Invoice related to this flow by utilizing the recordId variable created in the previous step.

    • Link URL:

      https://yourDomain.lightning.force.com/{!recordId}

This will allow users to access the Pre-Invoice associated with this flow by clicking on the link provided in the Welcome Screen.

Setting Up the Billing Run Screen

To create the Billing Run Screen with the Billing Run Initiator Component, follow these steps:

  1. Add a new screen component to the flow.

  2. Make sure to unselect the "Show Footer" option under the "Configure Footer" section.

  1. On the left side, locate the "Custom" section, and you'll find the "Billing Run Initiator" component. Add this component to the screen.

  1. It's crucial to use the recordId variable as an input for the component. To do this, enter

     {!recordId}

    in the preInvoiceId field of the Billing Run Initiator component.

This configuration will ensure that the Billing Run Initiator works with the Pre-Invoice associated with the recordId variable.

Creating the Final Screen

To set up the Final Screen and provide a link to the invoiced Invoice, follow these steps:

  1. Add a new screen component to the flow.

  2. Ensure that you unselect the "Show Footer" option under the "Configure Footer" section.

  3. Add a Display Text component to this final screen.

  4. Similar to the Welcome Screen, you can add a URL link that will open the Invoice that has been invoiced. Use the following URL format:

    • Link URL:

      https://yourDomain.lightning.force.com/{!recordId}

Now that you've completed the flow setup, save it. Next, let's create a custom button on the ADvendio Invoice object and add it to the Invoice page layout. The flow used in this tutorial is named "Billing Run Test Flow" with the API Name

Billing_Run_Test_Flow.

  • No labels