How to change entities relationships

This question has suggested answer(s)

Hello,

I have 2 entities (E1 and E2) related with a 1:N relationship. I would have liked to change this relationship to a N:N. Is it possible? If not, is there a workaround?

Thanks for your help.

All Replies
  • I would remove the 1:N relationship first, save and Publish and then establish N:N relationship.

    Raj 

    www.seepath.com

    Dynamics AX 2012  | CRM 2011 

     

  • Thanks for your answer.

    I tried that. The problem is that the information in both entities are not linked anymore: we can't see the entry in E2 relating to the entry in E1, and vice-versa.

    That is my issue: Modifying the relationship without losing information.

    Regards.

  • Hi CNavs,

    Thank you for asking this question. Two relationships at the same time is not possible in Microsoft Dynamics CRM. In order to create a N:N relationship the N:1 relationship should not be there and vice versa.

    Hope that answers the question.

    Thanks,

    Mohammad

  • Hi Mohammad,

    The 2 relationships were not at the same time.

    Here's the thing:

    - The two entities had a N:1 relationship. So 1 entry in E1 could be linked to N entries in E2. So if you open an E1 entry, the related E2 entries list is diplayed

    - Users have begun to enter information in those entities.

    - Now, we need that 1 entry in E2 can have N entries in E1. Which means modifying the relationship to N:N. Unless there is a workaround I don't know about.

    If I try to delete the N:1 relationship, add the N:N one, and then open the E1 entry, I don't see anymore the related E2 entries.

    For example, let's say a client could have N contracts, and 1 contract was linked to 1 client. When I would open 1 client, I would all his/her contracts.

    Now I also need 1 contract to be linked to N clients. But if I change the relationship between the Client and Contract entities to N:N, when I open a client, I can't see his/her contracts anymore.

    So it doesn't seem as simple as only modifying the relationship. Or maybe I miss a step...

    I hope it's more clear. :)

  • HI CNavas,

    I understand the scenario now.

    Basically you are trying to do a cascading of the relationship. What I think it is not possible because to do any modification it need to be unpublished and republish .And cascading on relationship is not possible. Please give me some time I will see if there is a workaround available on this requirement.

    Thanks,

    Mohammad

  • LOL - the answer is much simpler than all this. You have an unwanted 1:N relationship, and would like an N:N. Why can't we just create the N:N, migrate any data created from the unwanted 1:N and delete the 1:N?

  • Hi Michael,

    Are you saying it is possible to migrate data from the 1:N relationship to the N:N one? How can it be done?

  • I use Scribe Insight, but you can create a CRM Proxy and use SSIS. You're not going to be able to use the out of the box import tool for this one.