Exercise - Create a data entity

Completed

Scenario

As the finance and operations apps developer, you have been asked by the Fleet Management company to create a data entity to use for data integrations.

Create a new project

  1. Minimize the Microsoft Edge window.
  2. Select Run as administrator to open Visual Studio.
  3. Select Yes in the Do you want to allow this app to make changes to your device? window.
  4. Select Continue without code.
  5. Create a new project by opening the File menu and selecting New > Project.
  6. In the Create a new project dialog box, ensure that Finance Operations is selected in the Recent project templates section, and then select Next.
  7. In the Configure your new project dialog box, enter FleetManagementEntityProject2 in the Project name field.
  8. Select Create.
  9. To ensure the correct settings are in place, select Dynamics 365 in the Extensions menu.
  10. Select Options.
  11. Under the Dynamics 365 node on the left pane, select Projects.
  12. Ensure the check boxes for Organize projects by element type and Synchronize database on build for newly created project are selected.
  13. Select OK.

Create a data entity

  1. In the Solution Explorer window, right-click your FleetManagementEntityProject2 project.
  2. Select Add > New Item.
  3. On the left pane, select Dynamics 365 Items.
  4. On the middle pane, select Data Entity.
  5. Enter FMMyDataEntity in the Name field.
  6. Select Add. The Data Entity Wizard will open.
  7. In the Primary datasource drop-down menu, select the FMCustomer table.
  8. Specify the following options:
    • Entity category - Master
    • Select the check box for Enable public API
    • Select the check box for Enable data management capabilities
    • Leave all other fields as-is
  9. Select Next.
  10. Define your data entity and specify the fields that will be included in this entity.
  11. Select all fields.
  12. Select the Convert labels to field names check box.
  13. Select Next. You will see your new data entity in your project, along with a staging table and security privileges.
  14. Perform a build by right-clicking the project FleetManagementEntityProject2 in Solution Explorer and then selecting Build.

You may see an error because the batch server needs to be turned off in the environment. However, this does not affect the build and the data entity is created.