Monday, August 13, 2012

Custom Entity or Custom Activity in CRM 2011?

Not sure if you need a custom activity or a custom entity? This post mostly written by my co-worker Patrick Vantillard includes some of his conclusions after making some research about when to use a custom entity vs. a custom activity.


Difference
Custom Activity
Custom Entity
Logically
An activity represents an action such as making a call, or attending a meeting. This typically involves completing some “work” which is associated with the duration field (how long did it take you to complete the activity).
Activities typically have a lifecycle: opened à assigned à worked on à closed.
Activities in general cannot have sub-activities, at least not in the same native way that entities have associated activities.
Custom entities can represent any business entity. Custom entities store master data or transactional data and can have activities associated with the custom entity record.
Security
Given a security role, the same security applies to all activities (standard & custom) at once. You cannot give a different access level or privilege for a specific activity. For example, you cannot restrict “Delete” access to your custom activity but grant “Delete” access to other activities like Task.
You can control security privileges for each custom entity separately.
Visibility in the Application
When creating a custom activity you can check the “Display in Activity Menu” option which if selected, the custom activity will appear in all the Activity menus as well as the ribbon of all the activity-able entities (of course the ribbon can always be modified after).
We can hide custom activities in the activity menus by unchecking the “Display in Activity Menu” box. NOTE: once the activity is created, that setting cannot be modified.
By hiding the custom activity from the Activity Menu, your custom activities will also NOT show up in the “Activities” or “Closed Activities” views and associated views, so you would need a separate view for your custom activity (as if it were a custom entity).
Visibility of custom entities is controlled by the sitemap and form navigation menus.

Associating to the Case Entity
Because Case is an activity-able entity then your custom activity can be associated with a Case without the need of any special custom relationship and you can re-use the “Activities” and “Closed Activities” navigation menu to show all activities including your custom activity.
Custom entities will require a custom relationship to be able to associate them to a case. Therefore, you would require a new section in the form navigation to show specifically your associated custom entities.
Resolving a Case
By default, the case has been built in order to not allow a user to resolve a case as long as any of the related activities (standard & custom) are still open.
There is no validation on the status of the related custom entities when resolving a case.
Calculation of Time Spent on a Case
By default, on completion of the case, the Total time of the case will be calculated from the sum of duration values for associated activities.
When a case is reactivated and then resolved again, Total Time field is calculated with two different options:
1. If no contract associated with case, time spent on additional activities added to original total, included in Total Time.
2. If contract associated with case, only time spent on additional activities included in Total Time.
Associated custom entities have no effect on the calculated Total Time Spent on the case.
Contracts Related to Case
While creating a contract, a user can select an Allotment Type. A user can therefore specify how the support will be “budgeted” (or, “allotted”) for a contract. You can specify number of incidents, or amount of time (linked to activities)
On the contrary, no such behavior has been created on the contract level linked to standard and custom entities.
Dashboards, Charts and Views
By default, will be able to create a single chart comparing different type of standard and custom activities. Since all activities roll up to the “Activity” (activitypointer) base entity, you can create a chart/dashboard/view which takes data from all activity types including your custom activities.
The system won’t allow a user to create a single chart comparing multiple standard or custom entities. One chart will be required by entity.
Extensions in Silverlight or SSRS would be required to combine data from multiple entities.
Reports
Some out of the box reports are available will automatically include your custom activity. In addition, the report wizard will allow the user to create very easily some reports comparing all related activities linked to a case on a single Report
No reports are available out of the box for custom entities linked to a case.

In addition, the report wizard could be used by the user but the user won’t be able to combine multiple custom entities linked to a specific case. Thus, there is no simple way to provide an overview of a specific case and its related entities. ( e.g. Case linked to two custom entities: Main entity and a Peer Review)

1 comment:

  1. I have to check pros and cons of custom entity vs. a custom activity at the moment and your conclusions are very helpful for me now.
    Thanks for sharing!!

    ReplyDelete