12 Jan 2016

Entity Ownership in MS Dynamics CRM

When you create a new entity, you have to set the ownership options, How many ownership options are there?
entity ownership
I’m guessing most of you reading are going to say two.
  • Organization Owned
  • User Or Team
but did you know there are other types? Hidden types that only Microsoft can use/made up
There are several types of entity ownership. Most entities, including custom entities, are owned by the organization, by a user, or a team. There are some business entities that do not have an owner, such as discount type (discount list), where the ownership is defined by its parent entity discount. The type of ownership defines some of the operations that can be performed on a record. Ownership for an entity is defined in the metadata property OwnershipType. The following table lists the ownership properties.
Ownership TypeDescription
Organization OwnedContains data involving something that belongs to or that can be viewed by the whole organization. Organization-owned entities cannot be assigned or shared. For example, products are owned by the organization. These entities have an attribute named organizationid.
Business OwnedEntities that belong to a business unit. These entities have an attribute named owningbusinessunit.
User or Team OwnedAssigned to a user or to a team. These entities contain data that relates to customers, such as accounts or contacts. Security can be defined according to the business unit for the user or team. These entities have attributes named owningteam and owninguser.
NoneThese entities are not owned by another entity.

Business Owned and None!

I will admit I had never thought about the ownership options on the system entities and to think some business entities (new term) which do not have an owner.
I find it intriguing when you see how Microsoft bend the rules when creating system entities and data, so they can create the default functionality in CRM but it’s only when you understand how the entities and ownership works that you can understand how Microsoft have bent these rules and why.

Entity ownership Choice

I find making the choice of entity ownership is always a painful one, it always causes me to spend a few minutes deciding whether it should be organizational or user/team.  I’m always keen to choose organization where possible because it’s neater (when used appropriotly) and doesn’t create those extra fields.

Why is the choice important?

I know most CRM developers choose the default choice of User or team entity ownership and don’t even think about it, in fact I’m sure a lot of CRM developers don’t even know there is an choice about entity ownership (based on the fact I rarely see any choose organization entity ownership)
One reason making the choice takes a bit of time is once you make that choice and save it, there is no turning back.  It’s one of those decisions that cannot be reversed.  If you change your mind you have to delete the entity and start all over again.
Like some of the entity checkboxes – send email, queues, Connections, business process flows.  Once you tick these, they have the cross of doom and can never be unticked!!
Choosing ownership is probably more like selecting if an Entity is an activity, you make the decision and the only way back is deleting and recreating the entity.
So I have made it clear it’s a decision you don’t really want to get wrong and it’s not really that important because if in doubt you can choose user/team ownership and not use owning fields and functionality.
What’s the difference, Why does it matter
To understand why the decision is important you need to think about what happens when you choose one of the options and the security ramification of the decision

When you choose Ownership of User/Team

After you have chosen Entity ownership type of user/team, CRM will create some additional fields to enable the records to be owned by users/teams.
entity ownership 1
It creates fields for OwningUser, OwningTeam, owningbusinessunit and ownerid.
The reason it creates all the fields is for the security roles and the five access levels
  • Global
  • Deep
  • Local
  • Basic
  • None
You have to record the business unit of the user/team so the security role can work out what other users can view the record.
If you selected organization level of Entity Ownership then it has two access levels None and Global.
Organisation ownership means the entity will not have an owner field or any of the other user/team/business unit lookups.  Global or none visibility means the entity will ignore the business units of the users

No comments:

Post a Comment