+ Start a Discussion
Wes SmitheWes Smithe 

I've run into a very frustrating issue trying to create a Master Detail Relationship

Hi All,

Thanks in advance and I'll try to be brief:
  1. I've created an app called Marketplace Tracker to help manage our vacation rental business.
  2. The main object is Marketplace within which the records detail the the various vacation rental websites (marketplaces) we manage. 
  3. I'm currently in the schema builder adding objects / relationships in an effort to map out the app before I get down to the nitty gritty. 
  4. I have a master detail relationship from the Marketplace object to another (child) object called Geographic Region.
  5. And I have another master detail relationship from the Geographic Region object to another (child) object called Country.
  6. Then I have another master detail relationship from the Country object to another (child) object called State or Province.

Now is where the (non) fun begins:

For some strange reason I'm unable to repeat the straightforward process above by creating another master detail relationship from the State or Province to another (child) object called City. Specifically, when I drag the master detail relationship on to the child object (City) the related object (State or Province) does not appear in the drop down. 

Even stranger is that, as a test, I've deleted the master detail relationship between Country and State or Province only to find that I can then create a master detail relationship between State or Province and City, but then when I go back to re-create the master detail relationship between Country and State or Province (the one I deleted) the related object (Country) does not appear in the related drop down!

Someone please help before I run full speed through my office window! Thank you!

Best Answer chosen by Wes Smithe
Ramu_SFDCRamu_SFDC
It is a limitation enforced by salesforce that a master detail relationship can exist to a max of 3 levels beyond which the system will not allow. In your current case
1 Level Master -Detail relationship is between Marketplace and Geographic Region
2 level Master - Detail relationship is between Geographic Region and Country
3 Level Master - Detail relationship is between Country and State/Province

Now when you are trying to establish another MD relationship, it is not allowing which is working as designed. When you deleted the 3rd level MD relationship from the above schema, you are making a room for 1 more level(3rd level) hence you are able to create one more relationship.

More information on this can be found in the below knowledge base article by salesforce
http://help.salesforce.com/HTViewHelpDoc?id=relationships_considerations.htm&language=en_US

Hope this helps. Please mark this as the best answer if this answered your question for others benefit.

All Answers

Ramu_SFDCRamu_SFDC
It is a limitation enforced by salesforce that a master detail relationship can exist to a max of 3 levels beyond which the system will not allow. In your current case
1 Level Master -Detail relationship is between Marketplace and Geographic Region
2 level Master - Detail relationship is between Geographic Region and Country
3 Level Master - Detail relationship is between Country and State/Province

Now when you are trying to establish another MD relationship, it is not allowing which is working as designed. When you deleted the 3rd level MD relationship from the above schema, you are making a room for 1 more level(3rd level) hence you are able to create one more relationship.

More information on this can be found in the below knowledge base article by salesforce
http://help.salesforce.com/HTViewHelpDoc?id=relationships_considerations.htm&language=en_US

Hope this helps. Please mark this as the best answer if this answered your question for others benefit.
This was selected as the best answer
Wes SmitheWes Smithe
Thank you for providing closure! I will look into another solution.