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
eswarsfeswarsf 

Relationship between Accounts,Contacts,Opportunities

Hi,

When I was checking the 'Account Name' field in Contact Object it is appearing as a 'Lookup(Account)'.But when I am deleting Account record it is deleting Contact record also means it is behaving like a Master-Detail relationship.

I observed same behaviour with Opportunity and Accounts.

Kindly let me know which type of relationship is there between Standard Objects.

 

Thanks,

Eswar.

Best Answer chosen by Admin (Salesforce Developers) 
Ankit AroraAnkit Arora

Account and contact behaves as master detail in business logics but on UI it is a lookup relationship. Let me explain you a bit more.

 

You can create a contact without filling account i.e it shows that there is a lookup relationship between account and contact.

 

If you have created a contact with account and you delete that account then contact will be deleted, this shows that it is in Master-Detail relationship. This is a standard behavior.

 

So we can say it in both ways, but it documentation it is a lookup relationship.

 

For more reference you can visit : http://success.salesforce.com/ideaView?c=09a30000000D9y3&id=08730000000JL3KAAW

 

I hope it is clear now :)

 

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

All Answers

Ankit AroraAnkit Arora

Yes there is a master detail relationship between Account and Contact. To get the complete list please visit :

 

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_list.htm

 

http://www.salesforce.com/us/developer/docs/api/Content/data_model.htm#topic-title

 

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

eswarsfeswarsf

Hi Ankit,

Thanks for your reply.If it is a Master-Detail relationship between Accounts and Contacts then,kindly let me know why 'Account Name' field on Contact record is not  mandatory?

 

Thanks,

Eswar

Ankit AroraAnkit Arora

Account and contact behaves as master detail in business logics but on UI it is a lookup relationship. Let me explain you a bit more.

 

You can create a contact without filling account i.e it shows that there is a lookup relationship between account and contact.

 

If you have created a contact with account and you delete that account then contact will be deleted, this shows that it is in Master-Detail relationship. This is a standard behavior.

 

So we can say it in both ways, but it documentation it is a lookup relationship.

 

For more reference you can visit : http://success.salesforce.com/ideaView?c=09a30000000D9y3&id=08730000000JL3KAAW

 

I hope it is clear now :)

 

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

This was selected as the best answer
OnkiOnki

Hi,

 

What ever salesforce is mentioned in document related to relationship Its 100% true with custom development or customization not with existing relationship.

 

Salesforce SFA application and relationship is defined by salesforce so we can not change their behavior.

 

 

Onkar Kumar

Certified salesforce consulatant and developer.