Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum
Answered

Show N:N Relationships in views

Posted on by 80

Hi,

I have created a N:N relationship between the agreements and the funcional locations as I need it to connect the data properly. Now I would like to show attributes of the functional location entity in the view of the agreements. Is this possible and how?

Thanks for your anwsers!

  • Yannick Profile Picture
    Yannick 80 on at
    RE: Show N:N Relationships in views

    Awesome! I think this is exactly the way I need it. Thanks a lot!!!

  • Verified answer
    LuHao Profile Picture
    LuHao 40,866 on at
    RE: Show N:N Relationships in views

    Hi Yannick,

    Nested Editable Grid can only display its child entity records, that is, the intersecting entity.

    Let me take entities A and C as an example.

    Entitiy A and C should have a N:N relationship, and I want show fields of Entity C on the view of Entity A.

    So I created an Entity B, its relationship with Entity A is N:1, and its relationship with Entity C is N:1. (This way A and C are in N:N relationship)

    pastedimage1610526490777v2.png    pastedimage1610526529989v3.png

    Then, there are two lookup fields on the Entity B form, and they correspond to Entity A and Entity B respectively.

    pastedimage1610526763680v5.png    pastedimage1610526962242v6.png

    Add fields c1, c2 ,c3 of Entity C as columns on the view of Entity B.

    pastedimage1610527686061v9.png

    pastedimage1610527872838v10.png

    Enable Nested Editable Grid for Entity A.

    pastedimage1610528094713v11.png

    pastedimage1610528736681v16.png

    pastedimage1610528750368v17.png

    Finallly we can see fields of Entity C on the view of Entity A.

    pastedimage1610528986514v3.png


  • Yannick Profile Picture
    Yannick 80 on at
    RE: Show N:N Relationships in views

    Hi Hao,

    Thanks for your feedback. I understood a lot better how this works but still did not make it work as it is not possible to select a n:n relation entity in the nested grid parent ID...

    pastedimage1610469690969v1.png

  • Suggested answer
    LuHao Profile Picture
    LuHao 40,866 on at
    RE: Show N:N Relationships in views

    Hi Yannick,

    We will use the Nested Editable Grid to display the view of the intersecting entity on the agreements view, and then display the funcional locations columns on the intersecting entity view.

    In this way, we can display the funcional locations columns on the agreements view.

    https://d365demystified.com/2019/07/25/nested-editable-grids-in-d365-ce-v9-uci/

  • Yannick Profile Picture
    Yannick 80 on at
    RE: Show N:N Relationships in views

    Hi Hao

    Please have a look at the image below. There is already a connection to the functional location entity (1:n) but not filled with data as it is connected to the n:n relation which is not possible to show in the view (or i don't know how),

    pastedimage1610371934215v1.png

  • LuHao Profile Picture
    LuHao 40,866 on at
    RE: Show N:N Relationships in views

    Hi Yannick,

    Could you provide some screenshots?

  • Yannick Profile Picture
    Yannick 80 on at
    RE: Show N:N Relationships in views

    Hi Hao,

    Thanks for your feedback. I see one difficulty here in the link you have provided. The entity "agreement" has a connection to the "agreementbookingsetup" and "agreementinvoicesetup". So if I have an agreement X that is connected to the functional locations A, B and C I would have to make 3 times an entry for agreement X with the corresponding booking and invoice setups that are completely identical and connect them to either location A, B or C. If something changes in this agreement I would have to update each agreement on its own. Might there be another way to show this connection?

  • Yannick Profile Picture
    Yannick 80 on at
    RE: Show N:N Relationships in views

    Hi Mike

    Thanks for your feedback. I made (or basically Dynamics 365 automatically made) a intersect entity after making a N to N relation. Regarding the subgrid it is possible to show this entity but I am more interested if it is possible to do it in the table view (see picture) as well.

    pastedimage1610108580369v1.png

  • Suggested answer
    LuHao Profile Picture
    LuHao 40,866 on at
    RE: Show N:N Relationships in views

    Hi Yannick,

    To achieve this requirement, you have to manually create a custom entity as the intersecting entity of the N:N relationship.

    Using the default N:N relationship cannot achieve this requirement, because the intersecting entity of the default N:N relationship is internal, and its fields cannot be displayed in the user interface.

    Please refer to https://carldesouza.com/understanding-intersect-entities-and-nn-relationships-in-dynamics-365/

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Show N:N Relationships in views

    What kind of N to N is it?  Did you make an intersect entity or no?

    You should be able to add the 'parent' columns to the view in your subgrid, have you tried doing that?

    IF Im way off send some screenshots and I can provide more information.

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

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

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,564 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,651 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans