Activity › Forums › Salesforce® Discussions › Why we have to delete all records before creating a Master Detail relationship in a Master?
-
Why we have to delete all records before creating a Master Detail relationship in a Master?
Posted by shariq on July 4, 2017 at 1:31 PMIn Salesforce, why we have to delete all records before creating a Master Detail relationship in a Master?
shariq replied 7 years, 9 months ago 3 Members · 5 Replies -
5 Replies
-
You create a relationship field on the child object.
Can you explain clearly what you are asking – deleting all records of which object ?
- [adinserter block='9']
-
hello sudhir,
Either u delete all records on that child object or u first create a lookup then change it to master detail. My question is that, why u cant create master detail on that child object with existing records. -
Simply because the master-detail relationship mandates that for a child to exist, the master must exist.
All the existing child record must be first associated with their parent in order to convert lookup to master-detail.
-
Hi
If you want to create master detail on that child object with existing records then first you need to create to convert lookup to master-detail.
Thanks
-
Hi,
Main reason what I found is –
Master Detail is required field, that’s why on existing record it will be empty which is not allowed by salesforce so either delete those or create lookup and change it into master detail after filling the fields in existing records.
Thanks.
Log In to reply.