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
sonisuma76sonisuma76 

Master Detail Relationship - Clarification Required.

Hi there,

Can someone confirm this statement about MD relationship:
==============================================================
The detail side of the MD relationship must be a CUSTOM OBJECT. The MASTER can be standard or custom object but the DETAIL side must be CUSTOM object. 
=============================================================
I am confused with the last part of this statement stating - that DETAIL side must be a CUSTOM object. 

That may not be correct, because Account and Contact also have a Master detail relationship. Can some one confirm this?
 
jigarshahjigarshah
Account and Contact are not related through a Master Detail Relationship and it is a Lookup relationship.. Also, the following statement - "The detail side of the MD relationship must be a CUSTOM OBJECT. The MASTER can be standard or custom object but the DETAIL side must be CUSTOM object." means that when 2 objects are related through a Master Detail Relationship the child object in the relationship cannot be a standard object.

Standard object here refers to the readily objects available from Salesforce e.g. Account, Contact, Product etc. Refer the Standard Objects SOAP API Guide (https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_list.htm) to understand the standard objects Salesforce provides based on the Salesforce edition you own.

Custom objects here refer to User Created objects based on your business rules and their API Name ends with a "__c".

The statement means that if you are trying to establish a custom Master Detail Relationship for the following conditions then this is the outcome.

1. Standard Object is the Master e.g. Account and Standard Object is the Detail e.g. Contact - Not Permitted.
2. Standard Object is the Master e.g. Account and Custom Object is the Detail e.g. Invoice__c - Permitted
3. Custom Object is the Master e.g. Invoice__c and Standard Object is the Detail e.g. Account - Not Permitted
4. Custom Object is the Master e.g. Invoice__c and Custom Object is the Detail e.g. InvoiceLIneItem__c - Pernitted

The objects above could be different from the ones I mentioned but the outcome holds true.

Please mark this thread as SOLVED and answer as the BEST ANSWER if it helps address your issue.