Thursday, April 29, 2010

Querying N:N Relationships

Native N:N Relationships are not considered Entities in CRM 4, therefore the web services will not support using a RetrieveRequest against the N:N table.  However it is possible to query the table using Fetch XML.  Below is a simple Fetch query to retrieve the records in the "systemuserroles" N:N table.

                   

"resultXml" would look something like this:




and now you can parse through the result to grab the data you need.

No comments:

Post a Comment