Ask Search:
Christina IanssenChristina Ianssen 

How to connect several accounts to one opportunity?

We are a battery manufacturer that supplies to technology firms in the marine industry. Often there will be different technology firms bidding on one project, and they will all request a system solution from us as part of their bid. This creates a problem as sometimes we end up thinking there are more opportunities than there actually are. That's why we want to be able to have one opportunity which is the project, and then link the different accounts (technology firms) to this opportunity. 
Is this possible? 
 
Best Answer chosen by Christina Ianssen
Head In CloudHead In Cloud

Christina,

Below are the steps to create master detail lookup:-
  • Click on setup and search objects. Click on the objects link.
  • All of the custom objects will be shown there. You need to click on the custom object which you have created for this requirement. Lets say Opportunity Relation object which i have assumed on my answer.
  • Click on the New button in the Custom Fields & Relationships area.
  • Click on the Master Detail relationship radio box and hit on next button as shown below.User-added image
  • After hitting next button select a value in Related To field. Select Account in the dropdown field and hit next.
  • Provide some name in Field Name text box lets say Account and hit next button.
  • Again hit next in step 4 and step 5.
  • In last step i.e. step-6 hit save.
  • Your master detail field on Account will be created.
  • Do the above steps again and select Opportunity in step-2. Then your master detail field on Opportunity will be created.

Hope this helps. Do let me know if you have any doubt. If you liked my answers please mark it as the best answer. Thanks!!

All Answers

Steve MolisSteve Molis
You could use(repurpose) the standard Opportunity Partners object for this, or "roll your own" and create a Custom "Junction"  Object to connect multiple Accounts to the same Opportunity.

 Documentation Create a Many-to-Many Relationship
Head In CloudHead In Cloud
Hi Christina Ianssen,

If you want to add several accounts to a opportunity then you need to add a junction object here. For this you need to create a cutsom object say Opportunity Relation Object.

Steps to follow:-
  • You need to create 2 master lookup fields on the custom object(Opportunity Relation). First master lookup should be on Opportunity Object and second master lookup should be on Account object.
  •  Open any opportunity record to which you need to connect multiple accounts.
  •  Scroll below to view the related list of the cutsom object which we have created named Opportunity Relation.
  •  Click on new Opportunity relation button in the related list of the same.
  •  Create a record of the Opportunity relation custom object in which when you see Opportunity field is auto-populated with the same Opportunity from where you are creating the record. 
  •  Select Account to which you want to relate with the Opportunity. 
  •  Hit Save then you will be redirected to Opportunity detail page. When you see in the related list you will see that with the help of opportunity relation record this opportunity will be related to one of the Account.
  •  Similarly you can again create a opportunity realtion record from related list and select any other Account with which you want to relate the same Opportunity.
Hope this helps. Please do let me know if there is any doubt. Thanks!!
Christina IanssenChristina Ianssen
Thanks for your quick and detailed reply! I really appreciate it. 
How do I create master lookup fields on the custom object? 

Thanks, 
Christina
Steve MolisSteve Molis
In Step 1 when you create your new Custom Field select Master-Detail 
User-added image
Head In CloudHead In Cloud

Christina,

Below are the steps to create master detail lookup:-
  • Click on setup and search objects. Click on the objects link.
  • All of the custom objects will be shown there. You need to click on the custom object which you have created for this requirement. Lets say Opportunity Relation object which i have assumed on my answer.
  • Click on the New button in the Custom Fields & Relationships area.
  • Click on the Master Detail relationship radio box and hit on next button as shown below.User-added image
  • After hitting next button select a value in Related To field. Select Account in the dropdown field and hit next.
  • Provide some name in Field Name text box lets say Account and hit next button.
  • Again hit next in step 4 and step 5.
  • In last step i.e. step-6 hit save.
  • Your master detail field on Account will be created.
  • Do the above steps again and select Opportunity in step-2. Then your master detail field on Opportunity will be created.

Hope this helps. Do let me know if you have any doubt. If you liked my answers please mark it as the best answer. Thanks!!
This was selected as the best answer
Christina IanssenChristina Ianssen
Thank you so much! 
Thomas von EhrenThomas von Ehren
Why is the opportunity not shown on all accounts? Connected several accounts to one opportunity but it is only shown in the first one. Can anyone help?
Gaurav SaraswatGaurav Saraswat
@Thomas von Ehren, did you get the answer to your question ?
Kevin SavageKevin Savage
I am new to salesforce and we are using lighting experience and I am not able to understand how to get this setup..  Can someone provide detailed setups on how to deploy for dummies?  I am actually not too bad and have been seting up our company salesforce for the last couple months but not able to follow the above instructions...  Not sure if it is just me.

Hope somone can help
Tom HickeyTom Hickey
@Kevin Savage not just you. @Head In Cloud's response looks helpful but I can only follow the first three steps ...