Custom Report using FetchXML querying two entities with Many-to-Many relationship RRS feed

  • Question

  • Hi All,

    We have many-to-many relationship (custom) between Contact and a custom entity called Partner in CRM 2011.  The intermediate entity is called Contact Roles.  The intermediate entity has a picklist field called contactroletype.

    Now the many-to-many records might look as shown in the below table.

    Partners ContactRoleType Contact
    PartnerOne Development ContactOne
    PartnerOne Testing ContactTwo
    PartnerOne Development ContactFive
    PartnerTwo Infrastructure ContactThree
    PartnerTwo Development ContactOne
    PartnerThree Testing ContactOne
    PartnerThree Infrastructure ContactTwo
    PartnerThree Infrastructure ContactThree

    I want to create a report using only FetchXML (CRM Online), so that the final report looks as shown below.

    Partner Development ContactRole Contact Testing ContactRole Contact Infrastructure ContactRole Contact
    PartnerOne Development ContactOne, ContactFive Testing ContactTwo Null Null
    PartnerTwo Development ContactOne Null Null Infrastructure ContactThree
    PartnerThree Null Null Testing ContactOne Infrastructure ContactTwo, ContactThree

    Please let me know how we can achieve this.

    Thanks in advance.



    Friday, June 28, 2013 3:02 AM