Dynamics 365 Portals — Show data from external systems

Satya Kar
Satya Kar
Jul 24 · 4 min read

I was exploring the feasibility of getting data from external systems and displaying it in Dynamics Portal, and couldn’t find an easy solution. My initial thoughts were to implement an integration framework for pulling data from the external system, store it in Dynamics 365 for Customer Engagement and expose it to the Dynamics Portal. This needed some customisations, and external APIs for retrieving the data.

While experimenting, I found an easy way to achieve this using a Dynamics 365 virtual entity.

This post describes how you can integrate data from sources outside of Dynamics 365 for Customer Engagement and show them in Dynamics Portal using a virtual entity.

For testing I am using the Courses EntitySet, from the following publicly available OData v4 endpoint: http://api.purdue.io/odata/$metadata

The OData metadata of the external data source Course entity is shown below.

Create the Data Source

Create the data source for the OData v4 data provider in Dynamics 365 CE. Go to Settings > Administration > Virtual Entity Data Sources. Select NEW, select OData v4 Data Provider, and then select OK. Enter the details as shown below and select SAVE & CLOSE.

Create the virtual entity

Go to Settings > Customizations > Customize the System. In the left navigation pane, select Entities, and then select New from the main pane. On the Entity: New form, select the Virtual Entity option and set the Data Source. Enter the details as shown below and select SAVE.

Create the fields for the virtual entity

On the left navigation pane of the Entity: Course page, select Fields. Edit two newly created fields to set the external name and add a new field.

Open the new_courseid field, and update the External Name to CourseId. Select Save and Close.

Open the new_name field, and update the External Name to Title. Select Save and Close.

Create a new field for the External field CourseClusterId. Select Save and Close.

Configure the view

Open All Courses view, add the newly created fields and add sorting on Course Cluster Id. Select Save and Close.

In the Solution Explorer window, select Publish All Customizations.

Now, all the CRM configurations are completed, let’s configure the portal. Create the portal configuration from the Dynamics 365 Portals model-driven app.

Go to Dynamics 365 > Dynamics 365 Portals.

Create an entity list

Go to Portals > Entity Lists > Select New. Create an entity list record to render for courses. Select the ‘All Courses’ view created in CRM. Select the entity permission and search option, select Save and Close.

Create the Web page

Go to Portals > Web Pages > Select New. Create a web page and set the Entity List, partial URL and other parameters as shown below and select Save and Close.

Create the Entity Permission

Go to Portals > Entity Permissions > Select New. Create an entity permission record for the course entity to provide record access for the portal users, and set the other parameters as shown below Select Save.

Link the Authenticated web role to the entity permission.

View the external data on the Portal

Login to your Dynamics Portal and browse to https://<organisationname>.microsoftcrmportals.com[LJ1] /courses/ and you should be able to see the data from the external source. This page will show all the courses with fields configured in the CRM view. You can search records and navigate to all the pages.

Conclusion

I could see some potential in this method. Organisations can use virtual entities with Portals for displaying data such as events, announcements, and products; if the external system has an OData v4 endpoint and the data is not available in the Dynamics database.

Please share your thoughts and comments, if you are using virtual entities or would like to share your approach for displaying external data on the Dynamics Portal.

Join the Capgemini Microsoft team and apply to available jobs here

Capgemini Microsoft team

To share best practices, knowledge and experiences of the Capgemini Microsoft team

Satya Kar

Written by

Satya Kar

Capgemini Microsoft team

To share best practices, knowledge and experiences of the Capgemini Microsoft team

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade