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 CRM (Archived)

Create a view with N-N relationship as creteria

(0) ShareShare
ReportReport
Posted on by

Hello all,

I have two entites : User and Event, in which Event is a new entity. for presenting the internal attendees of  the event, I created a N-N relationship between them.

How can I create a view : The events that I attended, which means the list of events in which the actual user has attended?

I did the test, while the N-N relationship can not be the creteria of an advanced search. In the other case, may I create a button to display the associated view, or a web page, or a reporting?

Thank you all in advance for your ideas.

Chao ZHENG

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Hi,

    NxN relationships stores in an other table not an entity

  • Community Member Profile Picture
    on at

    Hi Erman,

    Yes, I know that when we create a N-N relationship, there will be an intermedia table created automatically in the database, but this table is not manipulable in the interface of Dynamics CRM.

  • Community Member Profile Picture
    on at

    "The events that I attended, which means the list of events in which the actual user has attended?"

    Via advanced find

    Look for Events

    Just leave "select" as it is and from the second "select", in the list of related items select user and then select "Equals current user".

    You can define the same filter criteria when creating a system view in the Event entity

  • Community Member Profile Picture
    on at

    Thank you Sven. But what you said is in the situation of having a lookup field in Event. Now the problem is the relationship type is N-N. There's no referential field that I can choose as criteria.

    Thank you all the same.

  • Community Member Profile Picture
    on at

    But with many to many you don't have a lookup?

    You will just see the relationship in the left hand menu

  • Verified answer
    MDoddio73 Profile Picture
    1,910 on at

    Hey, 

    Are you using CRM 4.0 or CRM 2011? In CRM 4.0, I don't think it's possible to join M:M relationships Using the Advanced Find.

    However, if you're using CRM 2011, it's fairly simple:

    1.) In the Look for: picklist, select the Event entity.

    2.) In the first column of your query, scroll down to the "Related" section and select User. This will create a new section below called "Users".

    3.) In the Users section, select User field. 

    4.) The next column, you can either select "Equals" (if you just want to hard code your User account into the query) or "Equals Current User" (if you want to allow others to run this query). If you choose the latter, your done, and ready to execute the query. If you choose the former...

    5.) In the Enter Value type in part of your name (and let the auto-resolve complete it for you) and hit the Tab key.

    You results should include all the Events to which you've been associated.

  • Community Member Profile Picture
    on at

    That's exactly the same as what I said two posts above :-)

  • MDoddio73 Profile Picture
    1,910 on at

    D'oh!

    Sorry. In my haste to answer, I didn't scroll down the entire thread, I wrote my answer right under the original post.

  • Community Member Profile Picture
    on at

    Hehe no problem, happened to me as well before :)

    I hope that this solution will help with Chao's issue.

  • Community Member Profile Picture
    on at

    Hello Sven, hello MDoddio73,

    Thank you for all your answers. In fact I am in CRM 4.0, that's why I did not find the expected field as Sven said.

    I have developed a ISV.Config button on the Event view to show the attended events view.

    In CRM 2011, that improves a lot.

    Thank you all.

    Chao

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 CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans