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
prashanth murukondaprashanth murukonda 

What happens when we convert MASTERDETAIL to LOOKUP relationship?

What happens when we convert MASTERDETAIL to LOOKUP relationship?
Rahul_kumar123Rahul_kumar123
Hi Prashanth murukondo,
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

If you are converting a master-detail relationship to a lookup for a custom object on the “detail” side, the organization-wide default for the object is automatically updated to Public Read/Write. Similarly, converting a lookup to a master-detail-relationship changes the organization-wide default to Controlled by Parent

Thanks 
​Rahul
 
Naveen KumarNaveen Kumar
Hi Prashanth,

Master-Detail to Lookup Relation:

If We have Rollup summary in Master we cannot convert it to Lookup relation, But if we dont have rollup summary then we can convert it to lookup relation.

We cannot create master-detail relationship if that object already have 2 Masters.

Lookup Field in Child becomes universal not required field.we can set it as required or not required as our wish.

In OWD child setting is changed from Control by Parent to Public Read/Write.

Lookup to Master-Detail Relation:

If we already have records in child without parent we cannot convert lookup to master-detail relationship,If we have parent for all child records then we can convert lookup relationship to master-detail relationship.


That answer was resolved your issue, Please choose the best answer that will be helpful for other deverlopers.

Thanks and Regards,

Naveen S



 
Amit Chaudhary 8Amit Chaudhary 8
Please check below post for more information
1) https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/relationships_among_objects.htm
2)


Differences Between Lookup and Master-Detail Relationships
There are fundamental differences between the two types of relationships in areas such as data deletion, sharing, and required fields in page layouts.
Master-detail relationships are typically used when there is a direct dependency between the two objects. These relationships have the following unique features.
  • You can’t create a detail record without a master record.
  • When you delete a master record, all its detail records are automatically deleted.
  • The detail record inherits sharing rules from the master record.
  • The number of master-detail relationships you can use are limited, depending on your edition and license.
  • You can’t set profile object permissions for a detail record. The detail record inherits permissions from the master record.
  • Master-detail relationships are automatically included in report record types.

Lookup relationships are appropriate when a relationship between two objects is required in some cases, but not always. Typical scenarios for lookup relationships are:
  • To reference commonly shared data, such as reference data.
  • To relate multiple parent records to the child record.
  • To link two objects together when you don't want the behavior of the master-detail relationship, such as sharing rules, profile permissions and cascade delete.
  • If the detail object has its own tab, then you probably want to use a lookup, and not a master-detail, relationship.

NOTE:- 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.