Data entities are a new concept in Microsoft Dynamics 365 for Finance and Operations. They replace previous concepts in Microsoft Dynamics AX, including AXD, the Data/Import Export Framework (DIXF), and aggregate queries. What’s nice about this is that data entities now combine these concepts. For example, you may have vendor data scattered throughout different tables in the system. Instead of having several tables throughout the system with the data I need, I can create a data entity to encapsulate all the vendor data into one de-normalized model. According to Microsoft, this process enables simpler read/write operations and enables abstraction of any internal interaction between the tables.
One of the best ways I have found to help my students understand data entities is to create one in Visual Studio, and then use the Data management workspace to import data. The Data management workspace is provided out of the box in Microsoft Dynamics 365 for Finance and Operations and replaces DIXF concepts. In this article, we will begin with reviewing how to create a data entity. Future articles in this series will walk through later steps in the process.
Let’s go through creating a data entity.
- Make sure you have Visual Studio open, and that you are running it as an administrator.
- Create or open a Visual Studio project.
- Right-click on the project in the Solution Explorer and select Add > New Item.
- Select Dynamics 365 Items > Data Model > Data Entity.
- Enter a name for your new data entity and click Add. The Data Entity wizard will open.
Adding a new Data entity
- Now, you can add parameters to the data entity. Here, I have specified the parameters for my new entity. MyNewDataEntity will be using the FMCustomer table as the primary data source, and I will allow public API as well as data management capabilities. If I didn’t enable data management capabilities, I would not be able to use the Data management workspace for data import and export.
Data Entity Wizard
- Click Next.
- Now you will need to start setting up the data that will be included in the data entity. In my example, I excluded the image and license image field, and made the DriverLicense field a mandatory field.
Data Entity Wizard – Adding Fields for the primary data source.
- Next, click the Datasource field to view the other data sources for this data entity. You can add additional fields in the element designer. In my example, I set the fields for the PrimaryAddress table, I have included all the fields, and I have converted labels to field names.
Data Entity Wizard – Adding fields for the PrimaryAddress table.
- Click Finish and the object will now be added to your project in the Solution Explorer. You will notice that the data entity will be added and security privileges will be added, as well as a staging table if you enabled data management.
Data Entity in the Solution Explorer
- In the Designer, you can further customize your data entity by adding data sources, fields, field groups, and so on. It’s important to note that you can only have one primary data source, all other data sources will be added in the node below the main data source.
Data Entity in the Element Designer
In the next part of this blog, I will show you the Data management workspace and how to import/export data to your data entity using it.
Want to learn more? Visit academy.rsmus.com for eLearning courses and information about our hosted training classes in Denver! Or Contact our Microsoft Dynamics experts at RSM (855) 437-7201.
By Meghan McMullen for RSM
@MeghanRSM