Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Retrieve N:N intersect record through plugin

Posted on by 420

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

  • Suggested answer
    RE: Retrieve N:N intersect record through plugin

    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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans