Skip to main content

Run a Flow from a Custom Button

Create a custom button and a Lightning record page to run the Create Child Campaign flow.

 

If you haven’t already completed the challenge in unit 2 (Build an Autolaunched Flow), do that now. Otherwise, you won't be able to complete this challenge.

  • On the Campaign object, create a custom button:
    • Label: Child Campaign
    • Name: Child_Campaign
    • Display Type: Detail Page Button
    • Behavior: Display in existing window without sidebar or header
    • Text: Enter a relative URL using the Create Child Campaign flow’s URL and these parameters in this order:
      • Set campID to the Campaign ID merge field
      • Set campName to the Campaign Name merge field
      • Set campOwner to the Owner ID merge field
      • Set campStartDate to the Start Date merge field (set the variable to be equal to
      • {!TEXT(Campaign.StartDate)} to format the date correctly)
      • Set retURL to the Campaign ID merge field
  • On the Campaign object, create a Lightning Record Page:
    • Label: Campaign Lightning Page
    • Page layout: clone the Campaign Grouped View Default (we won’t check this, but it ensures that you don’t start with a blank page)
  • Upgrade the Highlights Panel to Dynamic Actions:
    • Select Migrate
    • Source: Campaign Layout
  • Add the Child Campaign action
  • Save and activate the Lightning page.
    • Activation: Assign as org default
    • Assign form factor: Desktop (we won’t check this)
답변 16개
  1. 2023년 5월 10일 오후 1:17

    @Rodrigo Nunes,

    Please try this formula:

    /flow/Create_Child_Campaign?campID={!Campaign.Id}&campName={!Campaign.Name}&campOwner={!Campaign.OwnerId}&campStartDate={!Campaign.StartDate}&retURL=/{!Campaign.Id}

    Note: There should not be any spaces between '?','=','&' . 

0/9000