+ Start a Discussion
RossCo@DiscoveryRossCo@Discovery 

Impact of changing master-detail field to a lookup

Hi

Are there any impacts (in native Salesforce functionality such as report etc) I  should be aware of when changing a master-detail field to a lookup ?

Many thanks
Ross

Vinit_KumarVinit_Kumar
Some points you need to be aware of.

1). Master-Detail relationship fields are mandatory while Lookup is not.

2.) If you have any Rollup summary fields that won't work with Lookup fields.

3.) If you have any Apex code which is referencing master-detail fiel, it will stop working if you are not checking not equals to null in your code as future records might not have any value to this field(Look up is not mandatory).

Hope this helps !!

If this helps,please mark this as best answer to help others :)


Abhi_TripathiAbhi_Tripathi
Hey Ross,

There will be no loss of Data, if you change type of Master Detail field to Look-up field. So as in reports nothing affect them.

Regards,
Abhi Tripathi
Salesforce Certified Developer
Join My Blog : http://abhithetechknight.blogspot.in/
chris.noechris.noe
You can still make a lookup field required by checking the "Always require a value in this field in order to save a record" box when setting up your lookup field.  You can also prevent the deletion of the lookup record.  In addition to the points mentioned above, a lookup vs. master-detail will change the org-wide security settings for your custom object.  When you have a master-detail relationship, the security for your child object is controlled by the master.  With a lookup relationship, the child object has its own org-wide security settings (Private, Public Read Only, Public Read/Write).
Matty BMatty B
Actually what Abhi mentioned here is incorrect. Reports are indeed affected if you have any reports relating the lookup (parent and child) before the change to master detail. When you switch to master detail and try and access those reports you will get a message that the admin altered the relationship and these reports cannot be run anymore. Experienced it myself and requires you to recreate the reports manually. Make sure you screenshot the existing reports first (or review metadata but that not so fun). Or better yet change in another org and recreate them as you are logged into both using one as a guide. 
Amrit Patil 18Amrit Patil 18
Matty B, the question was changing master-detail to a lookup not the other way round. so your advise in this case is incorrect.