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 :
Customer experience | Sales, Customer Insights,...
Answered

N:N relationship data/field/attribute mapping when creating record from subgrid

(0) ShareShare
ReportReport
Posted on by 35

I have an N:N relationship between entity Case & entity Contact and trying to do mapping between them for a required lookup field "Category", so that when I'm creating NEW Case record from the Case subgrid in Contact form, the lookup field "Category" is pre-filled/pre-populated with Case's Category value.  Since it can't be done with data mapping (only applicable to 1:N relationship), I'm looking for a way to do that with custom code, but fail to construct it since I can't think of a way to pull the parent record creating the NEW record. 

Anyone knows how to pull the parent record when creating new record from N:N subgrid?  Or any other way to accomplish the N:N attribute mapping purpose?

Thanks a lot in advance!

I have the same question (0)
  • Verified answer
    meelamri Profile Picture
    13,218 User Group Leader on at

    Hi, 

    Please refer to this blog: 

    ashwaniashwin.wordpress.com/.../

  • Suggested answer
    danosagi_002 Profile Picture
    35 on at

    Thanks for the timely reply.  In this blog it was describing the scenario having entity A & B as N:1 relationship, but having a 3rd entity/attribute (Bank) N:N linked to both entities A & B, then it's mapping from A to B (N:1) with N:N related data.  

    However my scenario is that having entity A & B as N:N relationship, and having 1:N linked to both entities A & B, then it's mapping from A to B (N:N) with just a lookup field (N:1) data.

    But this blog inspired me to look into how Lead, Account, Contact, Opportunity works and I found Lead having both N:1 & 1:N & N:N relationship with Account & Contact.  Therefore, I solved it by created another entity B/"Case" lookup field in entity A/"Contact" (which is a N:1 relationship from Contact to Case), simulating the "Originating Lead" field & relationship in the OOB Contact & Account.  Then the mapping works exactly what I want.  Thanks for the inspiration although it was not the direct answer.

  • meelamri Profile Picture
    13,218 User Group Leader on at

    I'm glad you figured it out with a little extra analysis.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 184 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 125

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans