Screen Flow:
Action Override:
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.
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.
Log in to your Salesforce account. Click the Gear icon in the top right corner of your screen and select Setup.
From the Object Manager tab, search for and select the Opportunity object.
From the Buttons, Links, and Actions section, select New Button or Link.
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.
Once the button is created, add it to the Opportunity related list on the Contact object. Open the Contact object from the Object Manager.
Select the Page Layouts section and open the page layout where you need to add the button on the Opportunity related list.
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.
Click the '+' icon on the far-right side of the Buttons section.
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.
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
002519999

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.