Loading
The Trailblazer Community is now read-only Read More

Salesforce Platform Flow: Customize New Opportunity Button with Screen Flow

Publish Date: Sep 22, 2026
Description

Screen Flow:

  • An interactive flow in Salesforce that guides users through processes using user interface elements.
  • Allows users to input data, make selections, and complete tasks step-by-step.
  • Learn more: Getting Started with Screen Flows.

Action Override:

  • Replaces standard Salesforce buttons (like "New" or "Edit") with custom logic or Visualforce pages.
  • Enables customization of user interactions and workflows.

An organization is looking for a way to replace the standard 'New' button on the Opportunity related list on Contact record with a flow that the admin has created. They want to use this flow to create an Opportunity record instead of the standard 'New' button as they want some customization to their new opportunity screen.

Resolution

This article explains how to replace the standard "New" button on the Opportunity related list on a Contact record with a custom Screen Flow, allowing an organization to customize the Opportunity creation experience.

Note: In this use case, the Flow to create the Opportunity record is already created by the admin. This article covers only the steps to add that Flow to the Opportunity related list via a button, replacing the existing standard "New" button.

Button Override Configuration

Step 1: Open Setup

Log in to your Salesforce account. Click the Gear icon in the top right corner of your screen and select Setup.

Setup option in the Gear icon menu

Step 2: Open the Opportunity Object

From the Object Manager tab, search for and select the Opportunity object.

Object Manager with Opportunity object selected

Step 3: Create a New Button

From the Buttons, Links, and Actions section, select New Button or Link.

Buttons, Links, and Actions section with New Button or Link option

Substitute the values as follows:

Label: Name (provide any suitable label for the button)
Name: Name (provide any suitable API name for the button)
Description: Provide a suitable description (optional, but a best practice)
Display Type: List Button
Behavior: Display in existing window with sidebar (choose the option that best suits the behavior you need)
Content Source: URL

URL: /flow/Create_Opportunity?retURL={!Contact.Id}

Note: /flow/Create_Opportunity is the URL of the Flow. Check out this article to learn more about how to get the Flow URL and set variable values: Distribute a Flow with a URL.

retURL={!Contact.Id} provides a return URL so that once the Flow finishes, it navigates the user back to the Contact record from where the Flow was invoked. Check out this help article to learn more about controlling finish behavior: Control Flow Finish Behavior with retURL.

New Button configuration form with URL content source pointing to the Flow

Step 4: Open the Contact Page Layout

Once the button is created, add it to the Opportunity related list on the Contact object. Open the Contact object from the Object Manager.

Contact object in Object Manager

Select the Page Layouts section and open the page layout where you need to add the button on the Opportunity related list.

Page Layouts section for the Contact object

Step 5: Open the Opportunity Related List Properties

Scroll down to the related list section, or select the Related List option, and find the Opportunity related list. Click the wrench icon next to the related list to open the properties pane.

Opportunity related list properties wrench icon

Step 6: Swap the Standard New Button for the Custom Button

Click the '+' icon on the far-right side of the Buttons section.

Buttons section plus icon on the related list properties pane

  • First, uncheck the New checkbox under the Standard Buttons heading. Unchecking this removes the standard New button from the Opportunity related list.
  • Next, under the Custom Buttons heading, move the New button from the Available Buttons column to the Selected Buttons column. Select OK to close the modal window, then save the page layout using Save or Quick Save.

Standard New button unchecked and custom New button moved to Selected Buttons

Testing

Go to a Contact record to test the Flow. Next to the Opportunity related list, you will see the New button that was just added.

  • Click the button, and the Flow screen will open in a new window or the existing window, depending on the behavior selected while configuring the button.

New button on the Opportunity related list on the Contact record Custom Screen Flow opening after clicking the New button to create an Opportunity


Written by: Ajaypreet Singh Saini | Forum Ambassador
Ajaypreet Singh Saini is working as a Salesforce Implementation Specialist at Grantbook. Prior to Grantbook, Ajaypreet served as a Salesforce Administrator for 2 years working on Sales Cloud where he was responsible for configuring and administrating complex processes and maintaining security of the Salesforce instance.

Submissions reflect only the opinions of the user who made available the Submission and not the opinions of Salesforce, regardless of whether the user is affiliated with Salesforce, and may contain or constitute products, services, information, data, content and other materials made available by or on behalf of third parties ("Third Party Materials"). Salesforce neither controls nor endorses, nor is Salesforce responsible for, any Third Party Materials, including their accuracy, validity, timeliness, completeness, reliability, integrity, quality, legality, usefulness or safety, or any applicable intellectual property rights. Any Submissions made available through any message board or forum in response to posted questions, or that otherwise purports to answer any questions, including any questions about Salesforce or Programs, are made available for your general knowledge only and should never be relied upon as answers to your specific questions (even if an answer is marked as a "best" answer or with any similar qualifications). You should always contact Salesforce support for answers to your specific questions. Salesforce has no control over Submissions, and is not responsible for any use or misuse (including any distribution) by any third party of Submissions.

If you have questions, tap into the wisdom of our entire Trailblazer Community here: https://trailhead.salesforce.com/trailblazer-community/feed

Knowledge Article Number

002519999

 
Loading
Salesforce Help | Article