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.
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.
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?
- Obtain the URL address of the external service you’re using
- Get set up for a Dynamics 365 Organization
Steps in Dynamics 365
Create the Data Source
- Go to Settings
- Go to Administration
3. Choose Virtual Entity Data Source
4. Click New on the top left
5. Choose OData v4 Data Provider
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
- Go to Settings
- Choose Customizations
- Click on Customize the system
- Create a new entity (as you would a regular Custom Entity)
- Check the Virtual Entity checkbox
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)
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.
- Click on Fields
- Double click the ID field
- Make sure the External Name property matches the attribute name in your Data source (it’s case sensitive)
- Do the same for the Name field
- You can add as many fields as desired as long as they map correctly to the attribute names in your data source
- Create a Form with the created fields
- Create a View with the attributes you’d like to display.
- 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
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:
- As of this writing, they only support “OData” services. Any other format will not work (for now).
- 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.
- Fields that show on the form are read-only. You can see them, but that is all you can do with them.
- As the data does not store in the Dynamics 365 database, you cannot create workflows or plugins to manipulate fields.
- System administrators can connect to external sources and bring data without the need to write a single line of code.
- Users can search data, include them in views for dashboards, or even in their reports.
- Maintaining changes to the web services is possible without redeploying code.
- Developers can read data used in other processes.
- Retrieved data does not store in the Dynamics 365 library; it sits on the web service backend. This avoids duplicate records and saves storage.
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.