CRM Entity Relationship Many to Many (N:N)

There are two ways of getting the related entity details in many to many relationship in CRM 4.0

One way is to use RetrieveMultipleRequest function from the SDK:



For example, if we have a Loan custom entity and we want to return sets of borrowers (contacts):



---
Second way is to use Fetch function to return the XML of the related entities:


James Downey created a nice little program FetchXMLBuilder to help you build the fetch query.

---
Just for completion, below is the CRMServiceWrapper constructor that I use:



Hope this helps ^_^

4 comments

hy Andreas,
i'm trying to insert a record in entity with many to many relationship. how do i do that??

i'm using crmservice.create method.
any ideas??

thanks

Reply

Hi, you should use AssociateRequest to establish the relationship. Example is in this blog:

http://chaitanyaprasadtk.blogspot.com.au/2012/01/dealing-with-nn-relationship-in-crm.html

Reply

Thank you !! :)

Reply

Great article! Here is an interesting article that could be interesting for you - https://vine.eu/fi/markkinoinnin-automaatio

Reply

Post a Comment