In my previous post I mentioned the Common Data Services. In this post I will look at the CDS in more detail.
When starting with the CDS it is easy to create new entities and each entity can be used to store your business data in. Then PowerApps can be used to maintain your data either through Canvas apps or through Model Driven Apps. People can create their own apps, create their own entities and before you know it you will have yourself into a right mess.
Before creating your own Entities or letting other developers create their own entities, it might be useful to get familiar with all the existing entities. Quite often there might not be a need to create your won as things might already exist. When creating a new CDS quite a few entities are created and each of these entities have many pre-configured relationships configured ready for you to use.
The entities have been grouped by 8 different Tags. To ensure that I didn’t get lost in the flood of entities I have found the group view useful.
As i want to go through the different entities, I will will have a look at the master group and then the entities inside them.
Within the group of Master entities, I found Account and Contact. Account is a Client/Customer and you can record details on your clients using the Account entity. The list of organisations that you work with within your organisation you could store so that across all the applications that you might develop later on can use all use the common data services as a central store of company details.
Using the Contact entity it is possible to record data about the people that work for these clients.
Ok, that is a long list of relationships!
When looking at the details for the Company Name relationship between Accounts and Contacts,it is now easy to find out the details of the realtionship between these entities.
This shows all immediately the one of the problems with the CDS. You will need to keep control over the entities, relationships and all the other elements of your data design. In this post I already decided not to list all entities that come as standard with a new CDS, imagine if you have been using the CDS for a while and many applications have been developed? You might have 100s of entities. Developers joining your organisation migth not be familiar with all entities that have been developed already and create their won conflicting entities.
Taking control with permissions
To take control of the development you can do a few things. It is all about governance of your CDS. At this moment, a lot of this is still done from within the Dynamics 365 Settings, over time I would expect these settings to move to the CDS management screens in PowerApps.
One approach could be to create some additional security roles.
For example, you could create a Developer role and a Data manager role.
And then you can configure each of these roles to have different settings, so that you can ensure that Developer can use the data and Data Managers can control the data model?
Once the roles are right you could assign them to your users/teams within your organisation.
Of course, the suggested roles might not work for every organisation. A lot depends on the size of the projects and the sizeof the project teams.
Another approach that I like is the use of solutions. A new CDS comes with 5 solutions.
The CDS comes with a few examples. For example the Fundraiser example.This supplies a few custom entities. Although some examples can be helpful I find it a real shame that a ‘clean’ CDS comes with these examples as these samples do pollute my environment a bit.
It is of course possible to remove the sample solutions but the danger of that is that you move away from the standard CDS. During the creation of the CDS it would be a good idea to consider deselecting Include sample apps and data
When you deselect the samples you will find a much cleaner CDS will be created, with just the Default solution and the default Common Data Services Default Solution.
In the Entity overview you will also see that the sample entities have now gone.
The CDS is a great place to manage your data. While I’ve done both a lot of work with SharePoint and with Dynamics in the past, I’ve always battled with the question, where to store my data. SharePoint has always had the troubles with managing data in large quantities. This is where Dynamics has always been stronger. With the new CDS technology being available it does make hiding the data layer from my users a lot easier. All I need to do is present the data within a PowerApp in my SharePoint based intranet.
Care should however be taken and like with any database governance will be very important if you want to be sure that you don’t create a uncontrollable beast within the first year introducing this technology.