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.
In this article, we will see how to achieve this requirement.
Note: In this use-case, the Flow to create opportunity record is already created by the admin. We are just going to look at the steps to add this Flow to the Opportunity related list to be called via a button and replace it with the existing standard 'New' button.
Step 1: Login to your Salesforce account. Click the Gear icon on the top right corner of your screen and select Setup
Step 2: From the Object Manager tab, search and select the Opportunity object
Step 3: From the Buttons, Links, and Actions section, select the ‘New Button or Link' button
Substitute the values as follows:
Label: Name (Note: Provide any suitable Label for the button)
Name: Name (Note: Provide any suitable API name for the button)
Description: Provide a suitable description. (Note: It's optional but it's a best practice to provide description)
Display Type: List Button
Behavior: Display in existing window with sidebar (Note: You can choose the best suitable option based on what kind of behavior you need)
Content Source: URL
URL: /flow/Create_Opportunity?retURL={!Contact.Id}
Note: /flow/Create_Opportunity is the URL of the Flow.
Checkout this article to learn more about how to get the Flow URL and set variable values:
https://help.salesforce.com/s/articleView?id=sf.flow_distribute_internal_url_variable.htm&type=5
retURL={!Contact.Id} is used to provide a return URL so that once the Flow finishes, it will navigate the user to the Contact record from where the Flow was invoked.
Checkout this help article to learn more how to control finish behavior: https://help.salesforce.com/s/articleView?id=sf.flow_distribute_internal_url_retURL.htm&type=5
Step 4: Once the button is created, we have to add this button to the Opportunity related list on the Contact object. For that, we have to open the Contact object from the object manager
Now, select the Page Layouts section and open the page layout where you need to add that button on the Opportunity related list
Step 5: Scroll down to the related list section or select the Related List option (as highlighted below) and find the Opportunity related list. Click on the wrench icon next to the related list to open the properties pane
Step 6: Now, click on the '+' icon on the far-right side of the Buttons section
Step 7:
Finally, go to a Contact record to test the Flow. Next to the Opportunity related list, you will see a New button which we 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 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.