
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)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