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 365 | Integration, Dataverse...
Suggested Answer

Many-to-many relationship

(0) ShareShare
ReportReport
Posted on by 15

Hello,

Scenario: I'm building a vendor management model driven application. I have used the Contact entity to for Freelancers and created a custom entity named Certifications.

The certifications entity contains all the MS certifications  available. One freelancer can have multiple certifications associated with him or her and hence I have created a many-to-many relationship between Contacts and Certifications as show in the Fig-1.

Fig_2D00_1.png

Issue: After creating the relationship I have added the Certification subgrid in the Freelancers(Contact) form which shows me all the certifications associated with that a specific freelancer as show in Fig-2.

Fig_2D00_2.png

I'm unable to do that same in the Certifications form. I don't see the all the freelancers associated with a specific certification (Fig-3)

Fig_2D00_3.png

Please help.

I have the same question (0)
  • Wahaj Rashid Profile Picture
    11,321 on at

    Hi,

    Thank you for your query.

    Can you share your sub-grid configuration on the Certifications form?

  • Suggested answer
    Nya Profile Picture
    29,060 on at

    Hi,

    It’s something wrong with the view you selected for the sub-grid.

    You need to choose a view for Contacts. It can be set with a coming with the system one or customized one.

    pastedimage1618390974959v1.png

    What’s more, the Category in Fig-3 cannot be set in the view of Contacts for the N: N relationship between the two entities. (A contact can have more than one certificate, which means there can be more than one category. A row in this View corresponds to one contact record and cannot display multiple categories.)

     

    After saving and publishing the form, you’ll get the sub-grid of contacts in the form of certification.

     pastedimage1618391000626v3.png

    If this helped you, I'd appreciate it if you'd mark this as a Verified Answer, which may in turn help others as well.

    Best Regards,

    Nya

  • mithun_m Profile Picture
    15 on at

    Hi,

    Thank you for replying.

    The sub-grid configuration is as shown below: 

    pastedimage1618391028593v1.png

  • mithun_m Profile Picture
    15 on at

    Hi,

    I did that changes you mentioned, however I'm now facing a new issue.

    pastedimage1618391931589v1.png

    Kindly help!

  • Suggested answer
    Wahaj Rashid Profile Picture
    11,321 on at

    Hi,

    On the certifications form sub-grid, you should select Contact as related table.

  • Suggested answer
    Nya Profile Picture
    29,060 on at

    Hi,

    This is the same reason why you can't show the category of the certificate in the contact view.

    Each row of the Sub-Grid in your screenshot represents one record of a certificate, which can correspond to multiple Contacts and cannot uniquely identify a Freelancer.

     

    If this helped you, I'd appreciate it if you'd mark this as a Verified Answer, which may in turn help others as well.

    Best Regards,

    Nya

  • Suggested answer
    Wahaj Rashid Profile Picture
    11,321 on at

    Hi,

    I can see you have created another relationship with Contact (as lookup) named Freelancer. This will be empty if you do not fill it. There is no need of it as you have created a many-to-many relationship.

    There are 2 forms and you need to set it as following:

    • Contact: on the subgrid and select Certifications table here (many to many relationship).
    • Contact (freelancer): on the subgrid select Certifications table here (many to many). If you have multiple relationships, you need to select the correct one.

    Also, you cannot show Freelancer in the subgrid on the Contact, because it is already showing data related to current account. Remove this column form the view.

    Similarly, when you open certification, you should only see list of freelancer (not certification names).

  • mithun_m Profile Picture
    15 on at

    Hi,

    The forms I have are:

    • Contact (Freelancer )
    • Certification 

    I have created only one relationship. 

    Contact Form:

    pastedimage1618400530872v1.png

    Certifications Form:

    pastedimage1618400668010v2.png

    I'm unable to figure out the solution. 

    This is my requirement: 

    • If I click on a specific certification then I should be able to see all the Freelancers (Contacts) associated with that certification
    • If I click on a specific Freelancer (Contact), that I should be able to see all the certifications associated with that Freelancer(Contact)

    I have renamed that Contact entity as Freelancers and created a new entity called Certifications. I have established a many-to-many relationship between the two entities.  

    Can you please guide further?

  • Suggested answer
    Nya Profile Picture
    29,060 on at

    Hi,

    As what are shown in your screenshot, the settings of the sub-grids should meet your requirements.

    All you need to do is to tick the Show related records option so that only related records can be displayed.

     pastedimage1618558860736v1.png

    If this helped you, I'd appreciate it if you'd mark this as a Verified Answer, which may in turn help others as well.

    Best Regards,

    Nya

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 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 74

#3
Martin Dráb Profile Picture

Martin Dráb 64 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans