web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)
  • Suggested answer
    Cyclefitness Profile Picture
    on at

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans