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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Not clear about N:1 and N:N relationship, Subgrid and quickview form

(0) ShareShare
ReportReport
Posted on by 437

Hi Folks , 

I have confusion to understand the N:1 and N:N relationship . I didnt concrete example for these two. 

Please correct me - 1:N - To create this at N side lookup will created. We can achive this by adding lookup at N side entity  or we can also create by creating relationship. 1 .Primary side we cant have custoum entity.

Now what if we want to create N:1. How we will create thsi if we go and create lookup at N side then it will be the same like 1:N  just we reversing it here.

GIve any example.

Next how we create N:N relationship. like if we have contct (Student) and custoum entity Sujects. one Subject can belong to many student and one student can read many subjects.  what if we want to display all the names of student who has taken subject at Subject form. Like that I want to display 
all the subject  that a student has taken in contact form . Do we need to subgrid here . If so then how we can achive this functionality .  What is difference between Quick view form and subgrid ? Has any new functionality added in for these in crm 9.0

Kindly clear my doubts.




*This post is locked for comments

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi,

    1:N means the entity where you are creating can have multiple child record. So to have multiple child means that you have to give related entity to associate multiple records by lookup.So in the N side it will create lookup.

    Now the primary entity  always the entity where you are creating the 1:N relationship and the secondary entity will be the related entity.

    For N:1 exactly your understanding is correct.

    For N:N it's similar to create like others relationship,  you can display both the entities child in a subgrid . Check here for more info-

    docs.microsoft.com/.../create-and-edit-nn-many-to-many-relationships

    neilparkhurst.com/.../mb2-712-certification-microsoft-dynamics-crm-2016-customization-and-configuration-relationships

    Using Quick view form you can display the lookup field entity forms  , let say if you have a contact form where you have an account lookup. Now you can display the account information using quick view form. Quick view form should be created in account entity to display in contact form. So using quick view forms you can display account forms details inside contact form  which may contain  subgrid, fields etc..

    Now subgrid is to display only child , related entity data.

    Hope this helps.

  • windyMill Profile Picture
    437 on at

    Thanks Goutam.

    Just some few doubts . Since as you said subgrid is to display only , related records then is it means  we can use subgrid  in 1:N/N:1 relation where N side we we can use subgrid .

    Next in N:N can we add subgrid at both sides ?

  • Verified answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi,

    Think like in this way when you are creating 1:N relationship means N side is creating the lookup and you can associate multiple records in N side . And since multiple records are associating in N side so those records can be visible in sub-grid on 1 side . Which means  if  Account : Contact having 1:N relationship that means you can associate 1 account in multiple contact in N side so , in Account you can display subgrid of contacts . This is opposite and similar  for N:1 cases.

    Yes you can and that's why it is N:N relationships. For example Contact : Address , an contact can have multiple address and an address can also have for multiple contacts.

  • windyMill Profile Picture
    437 on at

    Thanks a lot .

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans