 Hello friends. I am Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. In this video, I'm going to demonstrate you how we can convert master detail into lookup relationship in Salesforce Lightning. If you want to follow Salesforce training videos, you can search my name Sanjay Gupta on YouTube and you can follow my YouTube channel. So in my one of the video I created master detail relationship for book and book history. So master detail field was created on book history object that was looking up to book. So now we are going to convert that into lookup relationship. So before converting master detail into lookup, you need to notice that whether you have rule up somebody feel created on master side or not. So let me check for book first. So I'm searching for the book. So book object is available there. I'm going to field and relationship and searching for roll up summary field. So here you can see two roll up somebody feels are available. So if you have roll up somebody feels created on master side, then you cannot convert your master detail relationship into lookup. Right. So let's try that also. So I'm now opening detail object that is book history going to field and relationship. So here this master detail to book is available. If I click on edit, so you will see there's no button for change data type. Right. Because we have roll up somebody feels already created on the master object. So first you need to delete those also from the recycle bin. Then only you will be having that change field type button so that you can convert your master detail into lookup. So I hope you understood the scenario. Now I'm going to delete both the rule up somebody feels. So one is deleted. Now I'm going to delete the second one. It is also deleted. So now there is a limitation in Salesforce. You cannot see deleted fields in recycle bin. So the one of the ideas also posted show deleted fields in lightning. So this idea is still open. Right. So work around is you need to go into Salesforce classic and then you need to delete those fields. So I'm doing the same. I'm moving to Salesforce classic going to set up searching for the objects. So custom object is booked. Now I'm scrolling down for custom field and relationships. So here you can see two deleted fields are available. The court count and total amount and both are rollups and repeats. So from here I'm using them. So these are deleted permanently now. Now I'm again switching to lightning experience moving to setup opening object manager. So now I am searching for the detail object that is book history. So remember that rollups and the fields are available on master side. So I deleted them from the master object that is book and master detail field is available on the detail side. So here it is now if I click on edit. So you will see a button change field type. Yeah, here it is. You can click click on it. You can select the lookup relationship click on next. Now if you want to change the settings like lookup editors and the required option what do what to do with the lookup record is deleted. So these kind of things you can set up again. You can click on next to set up FLS click on next to change the related list label and then you need to click on save. So you will see your lookup is converted and sorry your master detail is converted into lookup relationship. Right. So this is the way or you can say this is the demonstration how you can convert your master detail into lookup relationship. I hope you understood whatever I demonstrated in this video. If you want to follow Salesforce training videos you can search my name Sanjay Gupta on YouTube and you can follow my YouTube channel. Thank you for watching this video.