Can you change a junction object’s primary relationship?

I added my master-detail relationships in the wrong order and need to change my object’s primary relationhip. From the docs:

The first master-detail relationship you create on your junction
object becomes the primary relationship.

I tried deleting (and erasing) both relationships but when I re-add them the incorrect object is still showing as the primary relationship. Is there a way to change the order without deleting the entire object?


I had it once and I’ve eventually managed after some trial & error. Can you go to the “wrong #1” in setup and change field type to Lookup? The other guy should get promoted and when I’ve flipped it back to M-D it turned out to be the way I wanted. Might have been just a stroke of luck though.

Source : Link , Question Author : Mike Chale , Answer Author : eyescream

Leave a Comment