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
mak1smartboy1.391772340836093E12mak1smartboy1.391772340836093E12 

Unable to create Master - Detail Field on Child Object

Unable to create Master - Detail Field on Child Object.
If I am trying to create 2nd level  Master - Detail. Or making Standard Object Account as Master.

Error is not showing you cannot create 2nd level Master Detail OR you cannot make Standard Object as Master.

Below if link to same discussion:

https://developer.salesforce.com/forums/ForumsMain?id=906F00000008ybkIAA

This link provides 3 points to do to create this Master Detail relationship:
1. Create a lookup from the child object to the parent object.
2. Populate ALL the records with a valid lookup value to the parent.
3. Change the Lookup relationship to a Master - Detail relationship. This is only allowed if ALL RECORDS HAVE A VALID LOOKUP. Otherwise you'll get the error you describe.

What is 2nd point in this?

I have Customer who can have multiple accounts. In Customer there should be field which tell no. of accounts that Customer is having (through Roll Up Summary Field).
GunnarGunnar
This is a 'self' type of relationship. It will create a hierarchy.