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 :
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,216 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,216 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

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 137 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 57

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans