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 ^_^
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 ^_^
hy Andreas,
ReplyDeletei'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
Hi, you should use AssociateRequest to establish the relationship. Example is in this blog:
Deletehttp://chaitanyaprasadtk.blogspot.com.au/2012/01/dealing-with-nn-relationship-in-crm.html
Thank you !! :)
ReplyDelete