function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vani s 24vani s 24 

Relationship between Account and Opportunity

Hi,
What is the relationship between Account and Opportunity?


Thanks.
Avinash BarolaAvinash Barola
Hi,
Opportunity has lookup field of account.
Sunil RathoreSunil Rathore
Hi Vani,

An opportunity has a lookup field of account. Even though the relationship is a lookup, Salesforce treats certain standard object relationships in a hybrid model i.e. Relationship is Lookup but behaves like Master-Detail

Also in the backend, there is a relationship property "cascade delete" between Contact and Account which is always set to True. You will find the same cascade delete Property between objects in a Master-Detail Relationship.
So for any relationship where the cascade delete is set to True a child record is deleted when the parent is deleted.

Hope the above details will give you a complete idea. If does then mark it as the best answer so it can also help others in the future.

Many Thanks,
Sunil Rathore
Deepali KulshresthaDeepali Kulshrestha
Hi Vani,

Greetings to you!

Account and opportunity having Lookup relationship.
Simply, Account is a parent Opportunity. 
If we delete Account record, that related Opportunity records are deleted automatically from the database. 
Here lookup relationship is treated as Master-Details relationship. 
But lookup relationship is not mandatory field like master detail lookup relationship.

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com
 
Sherzod SafarovSherzod Safarov
Lookup relationship can't have roll-up summary field. Only master-detail relationship can have one. So, Account is master and Opportunity is detail.
Piyush DhakedPiyush Dhaked

Account and Opportunity are having a Lookup-Relationship still if the Account record (the parent) is deleted Opportunity record ( the child ) is also deleted.

It is clear that they are not having a master-detail as well. Can we call this as Cascade-delete??

Your opinions on this Deepali...