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
Patrick CutsforthPatrick Cutsforth 

Build the Object Model - You cannot add a master-detail relationship to a managed custom object?

I am stuck on Step 3: Add a Battle Station field (Master-Detail Relationship) of the Build the Object Model module. 

Create the Battle Station relationship field as follows:
For Data Type, select Master-Detail Relationship, and click Next.

When I follow these steps, I receive the following error message:

Error - You cannot add a master-detail relationship to a managed custom object

Any suggestions?

Best Answer chosen by Patrick Cutsforth
jigarshahjigarshah
Patrick,

I believe you are trying to use an existing object which is a part of a Managed Package that may have been installed on the Salesforce org where you are attempting to complete this challenge. Salesforce does not permit adding new Master Detail relationship fields to objects which are a part of the Managed Package. Refer to this existing Idea on Salesforce IdeaExchange which talks about the same restriction - https://success.salesforce.com/ideaView?id=08730000000Ji9lAAC

The solution here would be to create a new Custom Object called Resources instead of using an exisitng object and the steps in the module also mention about creation of a new object rather than using an existing. In case this does not work, use a fresh org with no prior customizations to complete the challenge.
Create Resources Custom Object

This should resolve your issue.

All Answers

jigarshahjigarshah
Patrick,

I believe you are trying to use an existing object which is a part of a Managed Package that may have been installed on the Salesforce org where you are attempting to complete this challenge. Salesforce does not permit adding new Master Detail relationship fields to objects which are a part of the Managed Package. Refer to this existing Idea on Salesforce IdeaExchange which talks about the same restriction - https://success.salesforce.com/ideaView?id=08730000000Ji9lAAC

The solution here would be to create a new Custom Object called Resources instead of using an exisitng object and the steps in the module also mention about creation of a new object rather than using an existing. In case this does not work, use a fresh org with no prior customizations to complete the challenge.
Create Resources Custom Object

This should resolve your issue.
This was selected as the best answer
Patrick CutsforthPatrick Cutsforth

Jigarshah...thanks! 
jigarshahjigarshah
Patrick, Please close this thread if your issue has been addressed.