web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Error: The record is already associated with another record

(0) ShareShare
ReportReport
Posted on by

The business would like the ability to add multiple 'Market Segments' to a Company.  I want to achieve this by placing a Sub-Grid on the Company form.  I created the 'Market Segments' entity, with 21 Market Segment values, created a 1:N relationship from Company:Market Segment, and added the Market Segment Sub –Grid on the Company Form.

When testing to add multiple Segments to the Sub-Grid for a Company this works fine, but when I try to add the same Market Segment value ‘Aerospace’ to another Company, I get the above error: 'Error: The record is already associated with another record'.  

What am I missing here?  I should be able to add the same Market Segments to different Companies.  I know I am missing something simple.  

Thanks.  

 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Guido Preite Profile Picture
    54,086 Moderator on at

    you need to use a N:N relationship, not a 1:N

    a Company can have N Segments, the same Segment can be associated to N Companies.

  • Community Member Profile Picture
    on at

    Agreed with Guido. In terms of what your CRM forms will look like at the moment:

    1) A sub-grid will be showing on the Company form.

    2) A lookup will be showing on the Segment form.

    With this 1:N relationship, if you look at the Segment form you'll only see the option to add one Country, whereas if you implement the relationship described by Guido, then you will have a sub-grid on both the Company and the Segment entity.

  • Verified answer
    Sayhaitokumar Profile Picture
    7,042 on at

    Hi Christopher Bradley,

    Try Using N:N relationship between them

  • Aileen Gusni Profile Picture
    44,524 on at

    Hi Christopher,

    I agree with Guido and Aaron.

    You should need the N:N Relationship (can be manual or native N:N)

    Explanation:

    "When testing to add multiple Segments to the Sub-Grid for a Company this works fine, but when I try to add the same Market Segment value ‘Aerospace’ to another Company, I get the above error: 'Error: The record is already associated with another record'"

    Yes, because you have 1: N Relationship from Company to Market Segment.

    And it means in the Market Segment perspective is N:1 Relationship.

    So, It means 1 Company can have multiple Market Segment (1:N Relationship is correct).

    But, 1 Market Segment can only have 1 parent Company.

    First, you have set the Aerospace to Company A, then you want to set Aerospace to Company B, which is not allowed.

    To check and ensure, you can go to the Market Segment record: Aerospace, see the field company (it is should be a lookup field to the company), you should see the company A has been there, so that you cannot tie the Aerospace to another company.

    Then, to make the Aerospace can have multiple Company tied to, then you need to create a N:N relationship between them.

    Hope this helps you.

    Thanks!

  • Suggested answer
    Mojtaba Profile Picture
    735 on at

    Try to remove 1:n relationship first then create n:n relationship if not in configured in your entity then you cloud be able to use a sub-grid in your main entity to add as mush as you want the records.
    i test it it works.

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

News and Announcements

Season of Giving Solutions is Here!

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
Shidin Haridas Profile Picture

Shidin Haridas 2

#2
Abdullah13 Profile Picture

Abdullah13 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans