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)

Retrieve N:N intersect record through plugin

(0) ShareShare
ReportReport
Posted on by 422

All of the threads I found on google show how to retrieve records through a N:N relationship for a specific filter, but I want to actually retrieve all of the records in the intersect table generated with a n:n relationship. With the webapi and in javascript, I can write [organization]/api/data/v9.1/new_x_new_yset to get a list of records with id pointing to entity new_x and new_y, but from plugin I'm unable to retrieve them. How can I achieve this?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Joseph McGregor Macdonald Profile Picture
    597 on at

    Hi anonsgate

    You should be able to query these records with a RetreiveMultiple call through the IOrganizationServicein instance a plugin. You just need to make sure that you use the intersect entity name, and not the relationship name if they are different

    This blog seems to contain details and an example query which uses an NN relationship bernado-nguyen-hoan.com/.../retrieving-related-records-in-an-nn-relationship-using-queryexpression

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