Featured Post

Web API Requests Series

Web API Series:  Create and Retrieve , Update and Delete , Retrieve Multiple , Associate/Disassociate , Impersonation , Run Workflows

Showing posts with label activities. Show all posts
Showing posts with label activities. Show all posts

07 April 2016

Activities Timeline

I have recently been playing with a very nice HTML Timeline control and have integrated within the Account form in CRM using the new Web API, of course! The Timeline is used to display activities related to the current Account record, it could be used on any record type though.

Here is a screenshot of the beta version:

Some of the functionalities so far:
  • Add new activities (phone calls, emails, tasks, appointments)
  • Drag to reschedule activities
  • Select activities to display
  • Zoom in and out to adjust the period displayed
  • Refresh view
  • Go to Today's activities

11 January 2012

How to retrieve all the activities for a record

In this post I will show how to retrieve all the activities in which a record is related to as:
  1. BBC Recipient
  2. CC Recipient
  3. Customer Optional Attendee
  4. Organizer
  5. Owner
  6. Regarding
  7. Required attendee
  8. Resource
  9. Sender
  10. To Recipient
It is also possible, of course, to select only few of them. To achieve this I will use a fetch XML query.
Here is  the query:

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
  <entity name="activitypointer">
    <attribute name="activitytypecode" />
    <attribute name="subject" />
    <attribute name="statecode" />
    <attribute name="prioritycode" />
    <attribute name="modifiedon" />
    <attribute name="activityid" />
    <attribute name="instancetypecode" />
    <order attribute="modifiedon" descending="false" />
    <link-entity name="activityparty" from="activityid" to="activityid" alias="aa">
      <filter type="and">
        <condition attribute="participationtypemask" operator="in">
          <value>4</value>
          <value>3</value>
          <value>11</value>
          <value>6</value>
          <value>7</value>
          <value>9</value>
          <value>8</value>
          <value>5</value>
          <value>10</value>
          <value>1</value>
          <value>2</value>
        </condition>
        <condition attribute="partyid" operator="eq" uitype="contact" value="Xrm.Page.data.entity.getId()" />
      </filter>
    </link-entity>
  </entity>
</fetch>

The corresponding advanced find query is:









Hope this helps,

Luciano.