locked
Custom Report - Activity details from Activity Pointer RRS feed

  • Question

  • I am using CRM Online, I'm trying to create a report of activities with FetchXML and need to pull some details from the individual activity records.

    My FetchXMl for the pointer is:

    <fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='true'>
      <entity name='activitypointer' enableprefiltering='true'>
        <attribute name='subject' />
        <attribute name='activityid' />
        <attribute name='description' />
        <attribute name='createdon' />
        <attribute name='activitytypecode' />
        <order attribute='createdon' descending='false' />
        <link-entity name="new_project" alias="pro" link-type="outer" visible="false" to="regardingobjectid" from="new_projectid">
          <attribute name="new_projectcode" />
        </link-entity>
        <filter type='and'>
          <condition attribute='regardingobjectid' operator='in' value='@project' />
          <condition attribute='createdon' value='@lowerf' operator='on-or-before' />
          <condition attribute='createdon' value='@upperf' operator='on-or-after' />
        </filter>
      </entity>
    </fetch>

    But I'm not sure how to then get the details from the other activities. This will be a combination of many activity types, emails and phone calls etc.

    Friday, November 30, 2012 1:41 PM

Answers

  • I have a work-around solution.

    First, I created 2 lookup fields on the activity entities, 1st for sender->contact and 2nd recipient-> contact.

    Then I have a plugin that runs on the create of the activity which populated the custom fields with the contact if the recipient field (party list) is a contact. You can expand this for other entity types if required.

    In my report based on the activity pointer, I have a table group with a row for each activity type. Right click the row marker (grey tab on the left) and select 'row visibility' and use the following expression:

    =iif(Fields!activitytypecode.Value="phonecall",false,true)

    For the other activity types use email, fax etc.

    Then for the From and To columns, I merge the data cells and input a sub report. For each activity type I create its own subreport pulling through the custom lookups 'new_sender' and 'new_recipient'

    • Marked as answer by Chris0123456 Wednesday, December 5, 2012 9:19 AM
    Monday, December 3, 2012 1:31 PM

All replies

  • We have the same requirement, I have yet to find a good way.

    I do know you can union datasets.....


    David Withers

    Friday, November 30, 2012 3:11 PM
  • I have a work-around solution.

    First, I created 2 lookup fields on the activity entities, 1st for sender->contact and 2nd recipient-> contact.

    Then I have a plugin that runs on the create of the activity which populated the custom fields with the contact if the recipient field (party list) is a contact. You can expand this for other entity types if required.

    In my report based on the activity pointer, I have a table group with a row for each activity type. Right click the row marker (grey tab on the left) and select 'row visibility' and use the following expression:

    =iif(Fields!activitytypecode.Value="phonecall",false,true)

    For the other activity types use email, fax etc.

    Then for the From and To columns, I merge the data cells and input a sub report. For each activity type I create its own subreport pulling through the custom lookups 'new_sender' and 'new_recipient'

    • Marked as answer by Chris0123456 Wednesday, December 5, 2012 9:19 AM
    Monday, December 3, 2012 1:31 PM