I have an object: objectA__c, with 2 master-detail relationships, one to objectB__c and one to objectC__c is it possible to leave one of these relatonships blank?

I would like objectA__c to always have a relationship to objectB__c but it's relationship to objectC__c should be optional.

Is this possible?

1 Answer 1


Master-Detail fields are a special kind of required fields, it has special considerations beyond just whether a value is required or not. When you set up a child as a master-detail, you're saying that it's tightly coupled to the Parent record; it cannot exist without a parent. Children in a Master Detail inherit security from their parent, they inherit their owner from the parent, they will be deleted when the parent is deleted, etc.

For these reasons, the only way a child table can be tied to a parent table with a Master Detail is for every record of the child to have a relationship to some parent.

Instead of Master Detail you can create a lookup relationship if you want the column to be optional.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .