This article will explore one method of exposing data entities (OData) to the public for communication with external software applications. This is a common requirement for clients that require EDI because not all data entities within Dynamics 365 are public. Currently, the ability to extend data entities and change its parameters is not possible, so one workaround is to duplicate or “copy” the data entity into a project and changing the IsPublic parameter to Yes.

In this example, we will go through exposing the DlvDeliveryModeEntity data entity.

Copy the Data Entity

  1. Open the Application Explorer.
  2. Navigate to AOT > Data Model > Data Entities and select DlvDeliveryModeEntity.

  1. In the Solution explorer, right-click the entity and select Properties.
    1. In the Name field, enter myDlvDeliveryModeEntity.
    2. Set the IsPublic parameter to Yes.
    3. Enter myDlvDeliveryModeEntity in the Public Collection Name and Public Entity Name

  1. Replace the original data entity name in methods.

Give Permission to Read the Data Entity

  1. Open the Application Explorer.
  2. Navigate to AOT > Data Model > Data Entities.
  3. Right-click DlvDeliveryModeEntity and select Find references.
  4. In the output window, look for the privileges associated with the DlvDeliveryModeEntity data entity.
  5. Open the Application Explorer.
  6. Navigate to AOT > Security > Security Privileges.
  7. Rightclick DlvDeliveryModeEntityExport and select Duplicate in project.
  8. Rename the privilege to myDlvDeliveryModeEntityExport.
  9. In the Solution Explorer, right-click and open myDlvDeliveryModeEntityExport in the Designer.
  10. Delete the existing entity under the Data entity permissions and add the data entity
  11. Open the Application Explorer.
  12. Navigate to AOT > Data Model > Security Privileges.
  13. Right-click DlvDeliveryModeEntityExport and select Find references.
  14. In the output window, look for the Duty associated with the privilege DlvDeliveryModeEntityExport.
  15. Open the Application Explorer.
  16. Navigate to AOT > Security > Security Duties.
  17. Right-click DataManagementApplicationExtReferenceEntitiesView and duplicate in project.
  18. Rename the Duty to myDataManagementApplicationExtReferenceEntitiesView.
  19. Open myDataManagementApplicationExtReferenceEntitiesView in designer and add myDelvDeliveryModeEntityExport to the priviledges

Want to learn more? Visit academy.rsmsus.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: Mathias Quandt and Pierre Abdel-Malek

Tagged with →