Skip to main content
Kymes Bennett 님이 #Trailhead Challenges에 질문했습니다
I keep getting a confusing error message in the "Create Object Relationships" part of the Data Modeling module.

 

Cannot Create Master-Detail Relationship

 

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. 

 

The part of the error message that's confusing is, what records would already exist?:

 

"You cannot create a new Master-Detail relationship on an existing custom object if records already exist"  

 

The only thing I can see is that there is already a Master-Detail relationship between Property and Favorite I created earlier in the unit, would I need to delete that before another Master-Detail relationship can be established?

 

Any help would be appreciated thanks
답변 2개
  1. 2018년 11월 18일 오후 7:02
    Hi Kymes,

     

    Do you already have any records on that object? If so, then you cannot add a master-detail relationship. You will need to either delete all records, or create the relationship as a lookup, populate it for all records, and then convert it to a Master-Detail.

     

    Master-detail relations are required, and by creating such a field while records exist they will not have a value.
0/9000