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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

1:N Relationship two ways?

(0) ShareShare
ReportReport
Posted on by 1,799

Hi, 

Here is a scenario: I have a custom entity called "Event Subscription". It's an intersecting entity between "Contacts" and "Events" (So instead of an N:N relationship, both have a 1:N relationship to "Event Subscription"). I want to see if an "Opportunity" or multiple Opportunities came from each "Event Subscription", and I want to be able to chart the Opportunities that came from the "Event Subscriptions" to see which were most effective. 

 

At first glance I would assume I would need to create a 1:N relationship between the entities "Opportunity" and Event Subscription". However, whilst this allows me to list the Opportunities on the Event Subscription form using a Sub-Grid, it doesn't allow me to chart when viewing all Event Subscriptions because I have no field to reference in the chart pane. 

 

I've thought about then creating a 1:N relationship the other way as well. This works with an Opportunity lookup field being placed on the Event Subscription form and allows me to create a chart; however, it only holds one opportunity. The Sub-Grid was able to show multiple opportunities stemming from the Event Subscription.

Any Ideas? 

 

 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    CRMTreky Profile Picture
    760 on at
    RE: 1:N Relationship two ways?

    Hi JD,

    I would suggest creating the 1:N relationship, where 1 Event Sub can have Many Opps.

    Once you establish the relationships, create a view that starts on the Opp Level and make sure to add the LookUp Column to the view that will show which Event Sub the Opp is attached too.

    Once you have your view, go ahead and add a Bar Chart and have the Horizontal (Category) Axis as the "Event Subscription" field and do the same with the Legend Entries (Series). This will give you a count of how many Opps are attached to a specific Event Sub.

    Hope this helps.

  • Suggested answer
    JDMCRM Profile Picture
    1,799 on at
    RE: 1:N Relationship two ways?

    Hi Jared, I actually found the solution. It's very similar to yours, but I wanted to be able to see the the "Event" the Opp came from not the "Event Subscription". This was my error as I didn't specify this in my original post.

    To get around this I set up a workflow that populated a hidden "Event" lookup field on the opp form with the event that was related to the "Event Subscription" on the form. This way I was able to use a view to create a chart showing Event Sub + Opp, as well as Event + Opp.

    Thanks for the suggestion. Appreciate it.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

#3
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans