You need to sign in to do that
Don't have an account?
Nani Sircilla
Create master-detail relationship on existing records
Hi All,
I have two custom objects like Student__c(Detail) and Batch__c(Master). I had created lookup field for Batch__c on Student__c and added some records. But now i want to change lookup field as master detail.
For that i have populated the lookup field with data in all records of Student__c and trying to change the relationship type to Master-Details.
but still getting same error like " You cannot create a new Master-Detail relationship on an existing custom object if records already exist. You must first create a Lookup relationship, populate the lookup field with data in all records, and then change the relationship type to Master-Detail. "
Please post the appropriate answer..
Thank you.
Nani.
I have two custom objects like Student__c(Detail) and Batch__c(Master). I had created lookup field for Batch__c on Student__c and added some records. But now i want to change lookup field as master detail.
For that i have populated the lookup field with data in all records of Student__c and trying to change the relationship type to Master-Details.
but still getting same error like " You cannot create a new Master-Detail relationship on an existing custom object if records already exist. You must first create a Lookup relationship, populate the lookup field with data in all records, and then change the relationship type to Master-Detail. "
Please post the appropriate answer..
Thank you.
Nani.
You need to create the lookup, then populate each one so that each child record has a parent record. This is because a master detail relationship does not allow for 'orphaned' child records. Once you have a lookup with each child having a parent, than you can go back and convert the lookup field to a master detail.
follow this url : https://success.salesforce.com/answers?id=90630000000h0TaAAI
If this answers your question then hit Like and mark it as solution!
If this answers your question mark Best Answer it as solution, It will help others!
Cyrus Talladen
www.levementum.com
I have a custom object with many records related to the account through a lookup. All the objects have an account entry. I can't change it from lookup to master-detail.
then edit each record and fill the fields on which you have lookup relationship in the object
then go to the Custom Fields & Relationships of an object and edit the lookup relationship fields then click on change field type button and select master-Details and save it