locked
crm 4 SQL reporting services RRS feed

  • Question

  •  

    Hi

    I've created a report that pulls appts, phone calls and tasks under the contact together but i want to group it on the caller. Looking at the schema it seems to be the from field that i need but I can't find it in the phone call filtered view or the filtered activity pointer that it links to. Does anyone know where this is stored?

    Tuesday, December 2, 2008 12:13 PM

Answers

  • Ok, i think partyidname might be the field you need from FilteredActivityparty where participationtypemaskname = 'sender'

     

    I used the query below to confirm that partyidname field holds a different value than the owner field if applicable.

     

    select FilteredActivityparty.activityid,

    regardingobjectidname, partyidname,

    filteredActivitypointer.owneridname

    from FilteredActivityparty(nolock) join

    filteredActivitypointer (nolock) on

    filteredActivitypointer.activityid = FilteredActivityparty.activityid

    where participationtypemaskname = 'sender'

    Tuesday, December 2, 2008 5:54 PM

All replies

  • If you can make the assumption that the 'caller' is the owner of the record, then group on owneridname from filteredactivitypointer.

     

    Tuesday, December 2, 2008 3:46 PM
  • problem is that the caller is not always the owner

    Tuesday, December 2, 2008 4:10 PM
  • Ok, i think partyidname might be the field you need from FilteredActivityparty where participationtypemaskname = 'sender'

     

    I used the query below to confirm that partyidname field holds a different value than the owner field if applicable.

     

    select FilteredActivityparty.activityid,

    regardingobjectidname, partyidname,

    filteredActivitypointer.owneridname

    from FilteredActivityparty(nolock) join

    filteredActivitypointer (nolock) on

    filteredActivitypointer.activityid = FilteredActivityparty.activityid

    where participationtypemaskname = 'sender'

    Tuesday, December 2, 2008 5:54 PM