Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Import error related to lookup attribute already associated with an existing relationship

(0) ShareShare
ReportReport
Posted on by

I have a situation which I'd like to get some advice with to make sure I'm going down the correct path for resolution.

I have a custom entity with multiple lookups to the same parent record; similar to the way you can have many lookups to Contacts; one is Customer, one is another role, etc.  Everything was fine with this until I attempted to import it into another environment.  At that time I got this error:

  • Entity Relationships - ist_AdjustmenttoPrevCC   - Error Text - EntityRelationship [ist_AdjustmenttoPrevCC] is invalid. The lookup attribute [ist_PrevCostCode] is already associated with an existing relationship.

I googled this and found references indicating this is a problem with the same lookup being used in the destination environment.  One recommendation was to change the relationship type from 1:N to N:1.  I'm not even sure how I would do that.  The relationship type was automatic when adding a new attribute as a lookup to the parent.

Before I even try to figure that out, I'd like to confirm what is actually going on.  Does anyone have experience with this?

Thank you!

3021.Error.png

*This post is locked for comments

  • Suggested answer
    Cyclefitness Profile Picture
    Cyclefitness on at
    RE: Import error related to lookup attribute already associated with an existing relationship

    I solved this issue.  As I analyzed the problem I realized I had the same lookup attribute in both environments but with different relationship names -- exactly as the error mentioned.  How did this happen one might ask, if all development is done in one environment?  I am consistent to a fault in naming of components.  At one point I created LookupA with RelationshipA in DEV and migrated it to QA.  I then decided LookupA wasn't needed so deleted it from DEV.  It never got deleted from QA.  I then later decided it WAS needed (fickle, yes) and created it again with the same exact name (two months later I might add ;-)) but a different relationship name, so in INT I had LookupA with RelationshipB.  In QA I had LookupA with RelationshipA.  When we tried to migrate Dynamics caught it.

    Sometimes just the exercise of typing out the question on this forum helps trigger methodical thinking. ;-)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans