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
CLINTA BABUCLINTA BABU 

Can anyone please tell how to convert look up relation ship in to Master detail relationship

Sai Teja 7557Sai Teja 7557
Hi CLINTA BABU,

1. If that existed via standard(salesforce created), we can't convert.
2. We can convert lookup field to master-detail field if that relation exists via a custom (if you created).but if already data present to that object where the relationship field exists, you can't convert directly because Master-detail Fields are required fields.
3.so if you want to convert those type fields you need to give data to all the records present in that object, then go to the field click on edit click on the change field type and then next, Next and Save. 
4.if data didn't present in that object you can straight away go to the field click on edit click on the change field type and then next, Next and Save.

if you find this solution helpful, please mark this solution as the best answer so that it will helpful to others as well.

Thanks
Sai Teja


 
AbhishekAbhishek (Salesforce Developers) 
You can convert a lookup relationship to a master-detail relationship, but only if the lookup field in all records contains a value.

Converting a relationship from lookup to master-detail or vice versa can cause existing custom reports to become unusable due to the different standard report types available for each type of relationship. We recommend that you test your custom reports immediately after converting the relationship type. If you revert your relationship back to the original type, the reports are restored and become usable again.

Converting relationships from lookup to master-detail, or from master-detail to lookup behaves the same as for two-object master-detail relationships. That is, the two linked objects in the detail-subdetail1 or subdetail1-subdetail2 relationship have the same conversion limits as the master-detail relationship.

You can’t delete a custom object if it is on the master side of a master-detail relationship. If you delete a custom object that is on the detail side of a master-detail relationship, the relationship is converted to a lookup relationship.

The second master-detail relationship you create on your junction object becomes the secondary relationship. If you delete the primary master-detail relationship or convert it to a lookup relationship, the secondary master object becomes primary.

For details please refer: https://help.salesforce.com/apex/HTViewHelpDoc?id=relationships_considerations.htm&language=en_US


I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.

Thanks.