Smart business solutions play an important part in big enterprises. When a business gets large enough, it needs a system to handle HR, customers, payroll, and other processes. Dynamics 365 is Microsoft’s solution for all businesses. It’s a one-size-fits-all product built in a very dynamic way (pun intended). It supports many customizations and configurations, with the help of virtual entities, to handle every part of the business.

When customers express interest in Dynamics 365, they often have one question: How can this integrate with our current system? How can the two systems communicate to unify the experience? Dynamics 365 third-party integrations have been around for a long time (by a long time we mean well before Dynamics 365, with separate dynamics products).  Dynamics 365 has now corrected a long-standing issue with integrations–they previously were programmed within the software. They needed custom code and external libraries to send and receive data to and from Dynamics 365.

 

Click here to download our free ebook on Dynamics 365 and get answers to your questions!

 

If you closely watch the path Microsoft is taking with Dynamics 365, some features are clear. They’re pushing for cloud versions more than on-premises versions. They are dividing their apps based on functionality allowing customers to purchase only the parts they want without having to buy an entire suite of features they will never touch. Finally, they are trying to reduce customization needs by creating new and unique ways to configure systems.

 

Customization vs. Configuration

Customization: Applications can be extended by writing custom code or implementing in other ways. In theory, most requirements that cannot be met by out-of-the-box functionality are possible with customization.

Configuration: Change system settings by using native, out of the box tools to without the need for deep technical expertise.

With each integration of Dynamics 365, Microsoft creates new ways that avoid writing custom code in favor of configuration. We saw this with the introduction of business rules replacing JavaScript code, real-time workflows replacing synchronous plugins, PowerApps replacing custom mobile applications, and finally, virtual entities make third-party integrations easier than ever.

 

What are virtual entities?

To simplify integration with external systems, Microsoft came up with a new idea first introduced in Dynamics 365 v9 July Update (released in October…I know, right?)

Virtual entities store data from external services. As you can guess from the name, they are virtual. The data does not reside in your Dynamics 365 database and avoids data duplication. Instead, as data is requested, the model builds at runtime without creating any physical instances.

 

How are Virtual Entities used?

First Steps:

  1. Obtain the URL address of the external service you’re using
  2. Get set up for a Dynamics 365 Organization

 

Steps in Dynamics 365

Create the Data Source

  1. Go to Settings
  2. Go to Administration

How to leverage virtual entities in Dynamics 365

3. Choose Virtual Entity Data Source

How to leverage virtual entities in Dynamics 365

4. Click New on the top left

5. Choose OData v4 Data Provider

How to leverage virtual entities in Dynamics 365

6. Click OK

7. Fill in the Name (This can be anything of your choosing), URL (the web service URL), and the Timeout (The number of seconds Dynamics 365 will wait for a response from the web service before failing)

8. Click Save and Close

 

Create the Virtual Entity

  1. Go to Settings
  2. Choose Customizations
  3. Click on Customize the system
  4. Create a new entity (as you would a regular Custom Entity)
  5. Check the Virtual Entity checkbox

How to leverage virtual entities in Dynamics 365

 

6. You will automatically see some changes (Data Source appears, Define as an activity is disabled with other options like auditing and duplicate detection)

7. Choose the Data Source created earlier

8. Fill in the required information (Display name, Plural name)

9. Save

When the Virtual Entity is created, two fields automatically add: ID and Name.

 

You’ll need to go to the fields of the newly created entity and map these fields to the fields from your service.

  1. Click on Fields
  2. Double click the ID field
  3. Make sure the External Name property matches the attribute name in your Data source (it’s case sensitive)
  4. Do the same for the Name field
  5. You can add as many fields as desired as long as they map correctly to the attribute names in your data source
  6. Create a Form with the created fields
  7. Create a View with the attributes you’d like to display.
  8. Go to the Navigation Bar and select your entity–TADA!

You should be able to see the view of the records fetched from the Data Source. Double-clicking a row will open the form you created.

Guide: Resell Microsoft Dynamics 365 With CSP Program

You’ve heard all about Microsoft’s Cloud Solution Provider (CSP) program and how it will make life easier for resellers like you. But when it comes right down to it, do you really understand how it works?

  • Exactly what the CSP is and how it works
  • How to get started as a CSP partner
*

Thank you! We’ve just sent you your ebook.

 

Limitations

It’s true that they may look like Dynamics 365 entity records, but the name virtual is there for a reason; there are some limitations:

  1. As of this writing, they only support “OData” services. Any other format will not work (for now).
  2. The primary key from the source needs to be of type GUID. If a data source has a primary key of type Int32 or String like a username, virtual entities won’t work.
  3. Fields that show on the form are read-only. You can see them, but that is all you can do with them.
  4. As the data does not store in the Dynamics 365 database, you cannot create workflows or plugins to manipulate fields.

 

Benefits

  1. System administrators can connect to external sources and bring data without the need to write a single line of code.
  2. Users can search data, include them in views for dashboards, or even in their reports.
  3. Maintaining changes to the web services is possible without redeploying code.
  4. Developers can read data used in other processes.
  5. Retrieved data does not store in the Dynamics 365 library; it sits on the web service backend. This avoids duplicate records and saves storage.

Conclusion

Virtual entities are a great concept that has amazing potential for future versions of Dynamics 365. It has some limitations as this is the first iteration, but it’s on the right path to becoming a worry-free integration solution.

A couple of months ago, just to achieve the same results, custom code was required. It would call the web services and retrieve the data along with custom entities to keep the data in your database. Now you can replace it all with basic configuration steps –it is simply amazing! Let’s hope the next update will decrease limitations and increase benefits, so virtual entities become the go-to solution for any third-party integration.

Written by Jade Bérubé Morin Content Marketing Specialist @ SherWeb

Jade is a Content Marketing specialist with an unbridled passion for her work. She graduated from l’Université de Sherbrooke in Communications and has worked as a Communications Advisor for marketing agencies and private companies for the last 5 years. When she’s not pouring over the latest marketing trends, Jade can be found honing her grand jeté in ballet class. She has studied ballet for more than 20 years.