locked
Roll up Relationships at Account Level RRS feed

  • Question

  • In addition to seeing the {Account to Account} and {Account to Contact} relationships at the Account level in the Relationships view, I would like to see *all* the Relationships that the Contacts associated with an Account have rolled up at the Account level. {Contact to Contact} 

    Does anyone have a solution to this?  Thanks.

    Sandy

     

    Wednesday, June 2, 2010 2:43 PM

Answers

  • It's probably too many "hops" - CRM seems to show items related to items related to the current one (two hops) but not three hops away.

    I don't kow if this custom solution might help you:

    http://blogs.msdn.com/b/paf/archive/2009/04/08/test.aspx

    Monday, June 7, 2010 2:35 PM
  • Same issue solved here:

    http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/7204e990-5ceb-422e-8c98-f4cccf37b0d3

                I solved this by scaling back on the number of columns of data I wanted returned, then used CRM auto-filtering to create a report available only at the Account level.  For the query, I created a union of Account relationships and Contact Relationships.  Using the hidden CRM_URL parameter, I embedded a hyperlink in the report (for Party2) containing the CustomerRelationshipID so that users may open any relationship and drill down into the related contacts or accounts from there thus eliminating the need to include additional columns of data in the report.

     

    Here’s the query to collect all relationships.  The CRM  attributes are all standard out of the box.

     

     

    SELECT     TOP (100) PERCENT FilteredAccount.accountid, FilteredAccount.name AS accountidname, FilteredAccount.name AS Party1,

                          dbo.FilteredCustomerRelationship.customerroleidname AS [Party1 Role],

                          dbo.FilteredCustomerRelationship.customerroledescription AS [Party1  Description], dbo.FilteredCustomerRelationship.partneridname AS Party2,

                          dbo.FilteredCustomerRelationship.partnerroleidname AS [Party2 Role],

                          dbo.FilteredCustomerRelationship.partnerroledescription AS [Party2 Description], dbo.FilteredCustomerRelationship.createdon AS [Referral Date],

                          dbo.FilteredCustomerRelationship.customerid, dbo.FilteredCustomerRelationship.partnerid, dbo.FilteredCustomerRelationship.converserelationshipid,

                          dbo.FilteredCustomerRelationship.customerrelationshipid

    FROM         dbo.FilteredAccount AS FilteredAccount INNER JOIN

                          dbo.FilteredCustomerRelationship ON FilteredAccount.accountid = dbo.FilteredCustomerRelationship.customerid

    UNION

    SELECT     TOP (100) PERCENT FilteredContact.accountid, FilteredContact.accountidname, FilteredContact.fullname AS Party1,

                          FilteredCustomerRelationship_1.customerroleidname AS [Party1 Role],

                          FilteredCustomerRelationship_1.customerroledescription AS [Party1  Description], FilteredCustomerRelationship_1.partneridname AS Party2,

                          FilteredCustomerRelationship_1.partnerroleidname AS [Party2 Role], FilteredCustomerRelationship_1.partnerroledescription AS [Party2r Description],

                          FilteredCustomerRelationship_1.createdon AS [Referral Date], FilteredCustomerRelationship_1.customerid, FilteredCustomerRelationship_1.partnerid,

                          FilteredCustomerRelationship_1.converserelationshipid, FilteredCustomerRelationship_1.customerrelationshipid

    FROM         dbo.FilteredContact AS FilteredContact INNER JOIN

                          dbo.FilteredCustomerRelationship AS FilteredCustomerRelationship_1 ON

                          FilteredContact.contactid = FilteredCustomerRelationship_1.customerid

    ORDER BY accountidname

     

     

    • Marked as answer by Sandy in Oaks Friday, August 20, 2010 2:00 PM
    Friday, August 20, 2010 1:59 PM

All replies

  • It's probably too many "hops" - CRM seems to show items related to items related to the current one (two hops) but not three hops away.

    I don't kow if this custom solution might help you:

    http://blogs.msdn.com/b/paf/archive/2009/04/08/test.aspx

    Monday, June 7, 2010 2:35 PM
  • Same issue solved here:

    http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/7204e990-5ceb-422e-8c98-f4cccf37b0d3

                I solved this by scaling back on the number of columns of data I wanted returned, then used CRM auto-filtering to create a report available only at the Account level.  For the query, I created a union of Account relationships and Contact Relationships.  Using the hidden CRM_URL parameter, I embedded a hyperlink in the report (for Party2) containing the CustomerRelationshipID so that users may open any relationship and drill down into the related contacts or accounts from there thus eliminating the need to include additional columns of data in the report.

     

    Here’s the query to collect all relationships.  The CRM  attributes are all standard out of the box.

     

     

    SELECT     TOP (100) PERCENT FilteredAccount.accountid, FilteredAccount.name AS accountidname, FilteredAccount.name AS Party1,

                          dbo.FilteredCustomerRelationship.customerroleidname AS [Party1 Role],

                          dbo.FilteredCustomerRelationship.customerroledescription AS [Party1  Description], dbo.FilteredCustomerRelationship.partneridname AS Party2,

                          dbo.FilteredCustomerRelationship.partnerroleidname AS [Party2 Role],

                          dbo.FilteredCustomerRelationship.partnerroledescription AS [Party2 Description], dbo.FilteredCustomerRelationship.createdon AS [Referral Date],

                          dbo.FilteredCustomerRelationship.customerid, dbo.FilteredCustomerRelationship.partnerid, dbo.FilteredCustomerRelationship.converserelationshipid,

                          dbo.FilteredCustomerRelationship.customerrelationshipid

    FROM         dbo.FilteredAccount AS FilteredAccount INNER JOIN

                          dbo.FilteredCustomerRelationship ON FilteredAccount.accountid = dbo.FilteredCustomerRelationship.customerid

    UNION

    SELECT     TOP (100) PERCENT FilteredContact.accountid, FilteredContact.accountidname, FilteredContact.fullname AS Party1,

                          FilteredCustomerRelationship_1.customerroleidname AS [Party1 Role],

                          FilteredCustomerRelationship_1.customerroledescription AS [Party1  Description], FilteredCustomerRelationship_1.partneridname AS Party2,

                          FilteredCustomerRelationship_1.partnerroleidname AS [Party2 Role], FilteredCustomerRelationship_1.partnerroledescription AS [Party2r Description],

                          FilteredCustomerRelationship_1.createdon AS [Referral Date], FilteredCustomerRelationship_1.customerid, FilteredCustomerRelationship_1.partnerid,

                          FilteredCustomerRelationship_1.converserelationshipid, FilteredCustomerRelationship_1.customerrelationshipid

    FROM         dbo.FilteredContact AS FilteredContact INNER JOIN

                          dbo.FilteredCustomerRelationship AS FilteredCustomerRelationship_1 ON

                          FilteredContact.contactid = FilteredCustomerRelationship_1.customerid

    ORDER BY accountidname

     

     

    • Marked as answer by Sandy in Oaks Friday, August 20, 2010 2:00 PM
    Friday, August 20, 2010 1:59 PM