CRM Extensions

Rollup activities for custom entities in Microsoft Dynamics CRM 4.0

Everybody who works with Microsoft Dynamics CRM knows that it is possible to see activities for special entities like contact, account or opportunity but not for custom entities. I had task to develop such kind of functionality. I proposed easier solution – report but customer wanted to have all activities in standard grid.

I made some investigations and understood that it is possible to do with handling of retrievemultiple message. I developed this plugin for one custom entity and after I decided to make it more flexible with possibility to configure without additional development. Here is the code of plugin:

 

To make it work you also have to configure it in the proper way – you should insert configure xml to unsecure configuration of step registration dialogue:

Here are registration parameters:

 

ParentEntityType is code of entity from which you want see activities of child entities.
ChildEntityName is scheme name of child entity.
Lookup is the relational field between parent and child entities.

Result of work of this plugin:


Activities of child entity.


Activities of parent entity.

This plugin work for History too.

You can download source code and compiled assembly here:

11 Comments on “Rollup activities for custom entities in Microsoft Dynamics CRM 4.0

  1. Hi Andriy,

    I am trying to implement this solution in CRM 2011. I have registered plugin on RetrieveMultiple message on activitypointer, Plugin triggering only when i am viewing activities from Activities link on Home page. when i am checking activities on Account entity its not firing the debugger to check.

    Any help from you.. RetrieveMultiple will trigger from any entity right while viewing activities.

  2. Hi Andriy,

    Thanks for your response.. The solution which you have provided is an unsupported one. Is there any supported solution to implement activities Roll-up functionality for custom entities?

    BTW,I am using CRM 2011 online version, we can't perform unsupported customization's on it..

  3. Hello David,

    Workaround provided in article works with webcontext that is unavailable in SandBox plugins. So I believe it could be complicated to do that. Possible workaround is development of custom webresource using html+js or SilverLight.

  4. Hi danisti,

    I have same requirement to view child entity activities in parent entity in ms crm 2011. I referred andrii's ms crm 4.0 plugin but stuck with converting it ms crm 2011.So can you please provide the ms crm 2011 plugin to fix this issue.This is my id -> kpshetty85@gmail.com

    Thanks in Advance.

  5. Hello Andrii

    Great work !! – I have modified and developed your plugin for CRM 2011.

    I have a question about the prefiltering view in the account entity.

    The new_activity lookup Activity Data is now only shown in the Related View and not in the linked associated view.

    It is possible to show the activity in the linked associated view and not in the Related View.
    –> This means in the same view as Opportunity Activities – or Contact Activities

    Regards,

    Andreas

  6. Sorry I mean the
    filter:
    RollupRelatedByParty (all activities from i.e. the account and the child entities like Contact)
    and
    RetrieveByParty (only Activitities which are directly linked (related) to the account.

    With the modified Plugin the activities of my custom child entity with own activities are only shon in the RetrieveByParty view.

    I have seen that you posted are unsupported SQL Statement for enabling SDK Message Rollup.

    Is this perhaps a possible way to show the activitities of the custom entity in the RollupRelatedByParty View?
    Do you have some experiences with this "dirty" change?
    –>http://a33ik.blogspot.com/2010/01/handling-rollup-message-with-plugins-in.html

    Regards,

    Andreas

Leave a Reply

Your email address will not be published. Required fields are marked *