locked
Add a new attribute / new relationship to Activity entity RRS feed

  • Question

  • Hello Community,

     

    As I could see recently, CRM does not allow you to add new attributes or relationaship to the activity entity: Ref. http://www.microsoft.com/dynamics/crm/using/customizing/activities.mspx

     

    Activity records are split between three entities

    The Activity entity (schema name: activitypointer) stores generic information that is tracked for every type of activity, such as the owner, the subject, the description, the status, the actual and scheduled duration, start, and end, and what the activity is regarding. You cannot add or edit attributes in this entity.

     

    Do you know if there is any way or workaround to do it?

     

    Thank you


    - Connected -
    Monday, November 29, 2010 9:41 AM

Answers

  • I very highly doubt that there is any sufficient workaround to customizing the "activitypointer" entity directly, since that entity is tightly integrated with the entities derived therefrom at the platform.  Even if you could find a way to push a new attribute or relationship into it, and even if you manually replicated the relationship to the derived entities (since I also doubt they would naturally inherit such from "activitypointer"), you would likely discover that the hacks aren't handled gracefully by the platform code and, aside from causing compatibility issues with updates or upgrades, will absolutely put you into "unsupported" territory with Microsoft.  All in all, such an attempt would be a "bad idea" in even the most meager sense.

    What I cannot fathom, is why--aside from any false sense of "ease"--it is not sufficient to simply customize all of the available "activity"-type records with the relationship you desire?  Surely, I can see the desire to be able to view or report on an inherited link between all activities to some other entity through a custom relationship, but even if you hacked CRM to provide the relationship, you'd still have to fabricate your own pages or views, and reports, to represent this relationship.  So, why make it harder than it already is?

    As for any attribute customization, the only one I can see making sense to "share" across all Activities (which would not necessarily offer significantly improved functionality than the present requirement to duplicate customizations across all Activity entities) would be the Picklist, and I believe CRM 2011 addresses this with a "shared" Picklist type that can be linked between several entities.  Unfortunately, CRM 4 offers nothing in this regard, and even the "prioritycode" Picklist for all activities is not customizable because of the forced binding between the derived entity and "activitypointer" entity.

    Long story short: I don't think there's any way or workaround that approaches a rational, sane, or stable result.


    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com
    Tuesday, November 30, 2010 12:38 AM
    Moderator

All replies

  • I very highly doubt that there is any sufficient workaround to customizing the "activitypointer" entity directly, since that entity is tightly integrated with the entities derived therefrom at the platform.  Even if you could find a way to push a new attribute or relationship into it, and even if you manually replicated the relationship to the derived entities (since I also doubt they would naturally inherit such from "activitypointer"), you would likely discover that the hacks aren't handled gracefully by the platform code and, aside from causing compatibility issues with updates or upgrades, will absolutely put you into "unsupported" territory with Microsoft.  All in all, such an attempt would be a "bad idea" in even the most meager sense.

    What I cannot fathom, is why--aside from any false sense of "ease"--it is not sufficient to simply customize all of the available "activity"-type records with the relationship you desire?  Surely, I can see the desire to be able to view or report on an inherited link between all activities to some other entity through a custom relationship, but even if you hacked CRM to provide the relationship, you'd still have to fabricate your own pages or views, and reports, to represent this relationship.  So, why make it harder than it already is?

    As for any attribute customization, the only one I can see making sense to "share" across all Activities (which would not necessarily offer significantly improved functionality than the present requirement to duplicate customizations across all Activity entities) would be the Picklist, and I believe CRM 2011 addresses this with a "shared" Picklist type that can be linked between several entities.  Unfortunately, CRM 4 offers nothing in this regard, and even the "prioritycode" Picklist for all activities is not customizable because of the forced binding between the derived entity and "activitypointer" entity.

    Long story short: I don't think there's any way or workaround that approaches a rational, sane, or stable result.


    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com
    Tuesday, November 30, 2010 12:38 AM
    Moderator
  • The only "true" workaround is to customize each Activity-type record (e.g. Email, Appointment, etc.) individually to include the relationships or attributes you require, and develop custom pages, reports, Workflows, or Plug-in code to support your intended functionality upon each as necessary.

    If you require additional insight as to approaching what you wish to achieve, please post a thorough description of the purpose for your inquiry.


    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com
    Tuesday, November 30, 2010 12:50 AM
    Moderator
  • Dave,

    There is one compelling reason to add attributes to the Aggregate ActivityPointer Table.  My client is using a user-defined Activity Type and I had to add it 6 times - Once to each Table.  Not a small task since there are 21 choices in the Picklist. 

    When I search Activities or just use the main Activities List in CRM I am not able to display this Attribute since CRM has no logic to know to display this Attribute differently for each line in the list.  A Task be followed by a Phone Call which can be followed by an Email etc.

    If I could create an Attribute in the aggregate Activity entity I would first not have the picklist and second I could display this Attribute in the different Activity Views.

    Gerry

    Wednesday, February 9, 2011 3:54 PM
  • Excellent observation.  I'm uncertain that a shared attribute could even be created in the latest CRM edition (though I have no experience with it yet, so I must defer to another expert there), so I think we're just simply running into a limitation of the system.  As you indicate, it's not just a matter of making the attribute available, but also coercing it into views which present all activities.  I think the "supported" approach might go something like this:

    1. Extend each activity with a Lookup to an "Activity Type" entity (that keeps your common-list management to an absolute minimum).
    2. Write custom grid views that display Activities together with a column for the custom attribute

    On top of that, there are several unsupported modifications that are simple to make that might smooth the appearance out significantly:

    1. Use Daniel Cai's Lookup-to-Picklist conversion code.  Makes a Lookup work like a Picklist.
    2. Hide the standard "Activities" views with custom code, so that way only your custom grid is available.

    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com Please follow the forum guidelines when inquiring of the dedicated CRM community for assistance.
    Wednesday, February 9, 2011 5:58 PM
    Moderator