Carefully consider the security consequences of choosing to create a custom activity, if you get it wrong, you will have to do it all again and move the data – The Hosk
recently I blogged about entity ownership – CRM Entity ownership – How do you decide? and today I will continue my adventure with entities and look at activities and custom activities.
What are activity entities
Before you we talk about custom activities we need to understand what activity entities are in Dynamics CRM. Activity entities are activities and tasks people can perform in CRM, out of the box we have there are
- Phone Call
Activities share a some common fields related to time (spent on the activity)
- Start time
- Stop time
- due date
Activities have 3 states
Activities are created and then completed (email sent, phone call made, meeting attended) or cancelled.
Activities can Party
There is a complex and mysterious force in the CRM world called ActivityParty. I’m not going to go into in detail but it’s a complex type which can be a person or group associated with an activity. It’s used when you select multiple email addresses, multiple resources in.
if you want to learn more about ActivityParty entity click here
Pictures can explain easier than words and this picture is great and it’s from the msdn post on Activity Entities
We understand what activities are in CRM and they seem pretty useful and the good news is in CRM 2011 onwards you can now create custom activities.
Like many things in CRM, just because you can doesn’t mean you should, you need to think long and hard before you press the button – The Hosk
What is a custom activity?
When you create a new entity you can make a standard custom entity or a custom activity. Custom activity which will appear in the same options where the current out of the box activities appear (If Display in Activity Menus is checked)
Custom activities like OTB activities are usually activities and have time aspects, examples I can think of our
- Project Work
- Task time
- product released
How do you create a Custom Activity
When you create a new entity, there is a check box
Define as an Activity Entity
if you tick this checkbox you new custom entity will be a new custom activity
Important facts to remember when creating Custom Activities
- Custom Entities when created by default are not viewable/usable to any users apart from System Administrator and System customizer roles. Other security roles will have to add the entity (don’t forget)
- IF an entity is selected as an activity this cannot be undone
- Custom activity entities are available to users who have access to other activity entities
This blog from PowerObjects walks you through creating a custom activity, what’s particularly useful is how it shows you the custom activities sitting with the system activities, it gives you a good idea how useful the functionality can be.
When should you create a custom activity
You should consider creating a custom activity if the entity is an action or the activity
- Is it an action?
- Is there time related aspect like duration, start time, end time?
- Activities are you usually completed/closed (like attending an appointment, sending an email, making a phone call)
- Is it an activity, do you need to record how long you spent on it
- There is NO security requirements now or in the future (e.g. all users can see activities)
Security is a vital consideration you must take into account if you are thinking of creating a custom activity, the reason for this is a custom activity will not have any security, all users will be able to see it.
Why is this?
You won’t be able to configure the security roles to allow certain users to see your custom activity because it will come under activities in security privileges. The ability to group activities together is a benefit and a disadvantage.
Group activities is great when you want to see all activities together
Grouping activities comes at a cost, all activities come under the same security privilege (if I’m wrong CRM MVP Adam Vero will be sure to correct me :-))
If you only want to allow a certain security role to see activities, this would mean the other users wouldn’t be able to see any of the out of box activities (phone, email, appointment etc) as well as your new custom activity.
99 percent of the time you will want all users to see activities, which means you can’t hide your custom activity from any users.
This has caused me a lot of pain in previous projects where suddenly a customer decided we needed to apply security to a custom activity. The solution to this is you have to create a normal custom entity (Which you can apply security to), copy all the data into your new entity and then delete the custom activity.
It’s a painful process, so think long and hard before creating a custom activity.
An additional reason you should think carefully before pulling the trigger and creating a custom activity is you cannot change to a custom entity if you change your mind, there is no turning back or switching. This is a delete and start again decision and every time you delete an entity, you will have to rescue the data by exporting it before you delete the entity (if you want to keep it of course)
This isn’t the same but like my blog on CRM Entity ownership – How do you decide? you can change your mind later, so you have to try and make the right decision.
CRM MVP Gonzalo Ruiz has written a great blog
The blog runs through the differences between creating a custom entity or custom activity and makes some very good points. The blog was written for CRM 2011 but most of the points are relevant for CRM 2013 and CRM 2015.
If you want to read a bit more about Gonzalo, read his Hosk CRM MVP questions and answers