Not being able to delete Master-Detail Relationship field on an object

At times the platform doesn’t allow you to delete the Master-Detail relationship and we will look at how to handle such situations.

Let me give you a scenario, you have 2 objects and you have a Master-Detail relationship between them.

You went ahead and created a roll-up summary field on the parent object.

For some reason, you now want to delete the relationship field on the child object.

As usual, you will try to delete the roll-up summary field first, then you will navigate to the child object. You will click on the relationship field and click on the delete button, only to realize that the platform is not allowing you to delete the relationship field.

Assume you even checked if this field is not being referenced in any other entities like workflows, process builders and etc.

If you are like me, you would have banged your head to the keyboard and ran in circles for an hour to understand why is that Salesforce being rude to you.

But the catch is the platform is actually trying to save you.

This behavior happens when you have the deleted roll-up summary field in the deleted fields section.

Try to delete that too and you will be able to easily delete the relationship field on the child.

Hope this helps!