7

I'm going through the Trailhead training (here), and see the following two snippets which seem to disagree:

"It’s possible to change a lookup relationship to a master-detail relationship, but not the other way around. Hence, if you’re in doubt which one to use, it’s best to start with a lookup relationship. If you later decide you need the features of a master-detail relationship, you can change it.

And later on the same page I find:

"If you delete the primary master-detail relationship or convert it to a lookup relationship, the secondary master object becomes primary."

These seem at odds to me, so either (1) I'm misunderstanding what it's saying or (2) there is a discrepancy in the documentation. Which is it? If I'm just misunderstanding, can someone explain what it really means?

14

From the Salesforce documentation: Considerations for Relationships

Converting Relationships

You can convert a master-detail relationship to a lookup relationship as long as no roll-up summary fields exist on the master object.

You can convert a lookup relationship to a master-detail relationship, but only if the lookup field in all records contains a value.

| improve this answer | |
  • Then do you think the first quote in my post just plain wrong? Or just an inaccurate simplification because they haven't gone over roll-up summaries? – loneboat Mar 11 '15 at 20:08
  • 1
    When in doubt, trust the official documentation. Trailhead's statement is without question, incorrect. – Mark Pond Mar 11 '15 at 20:17
  • @MarkPond are there any considerations specifically to doing this in a managed package? – NSjonas Jun 30 '17 at 23:28
  • 2
    @NSjonas yes there are - in a managed package, the field data type is locked and cannot be changed. developer.salesforce.com/docs/atlas.en-us.packagingGuide.meta/… – Mark Pond Jul 1 '17 at 18:14
  • Just a note, the fields have to be hard deleted. If they're still in your Recycle Bin you will remain blocked. – Adrian Larson Apr 18 '18 at 17:26
7

Yes, this is a known issue. Mark Pond is correct, our information in that unit on Trailhead is inaccurate. You can convert as long as there are no RSF fields. https://help.salesforce.com/HTViewHelpDoc?id=relationships_considerations.htm&language=en_US

We've got the fix teed up and ready to go in our next release.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.