Virtual Entities
in
Dynamics 365
Ashish Vishwakarma
Virtual Entity At a Glance
- Introduced in D365 V9.0 July 2017 Update
- Access External Data as Native
- Simplified Integration with External Systems
Need of Virtual Entities
- Configuraton over code
- Eliminate need of replicating data
- Realtime data access
Limitations
- External systems should know D365 lingo
- If not get them an Interpreter
- GUID should be used as primary key
- Performance relies on external system
- Read only as of now
- Organization owned only
- No auditing support
- No processes support (BPF, Workflow etc)
- No duplicate detection
- No rollup/calculated fields
Components Involved
- Data Provider
- Data Source
- Virtual Entity
Data Provider Example
Virtual Entity Data Sources
Creating New Data Source
Creating New Virtual Entity
OData V4 Data Provider
- Shipped out of the box
- Supports OData Types
- Requires external API to support OData
Demo
OData V4 Data Provider
Azure CosmosDB Data Provider
- Preview feature as of Aug, 2018
- Available free at AppSource (https://appsource.microsoft.com/en-us/product/dynamics-365/mscrm.documentdb_data_provider)
- Requires Azure subscription with Cosmos DB
- Azure Cosmos DB database type should be SQL.
Demo
Azure CosmosDB Data Provider
Custom Data Provider
- Coding required
- Plugins on Retrieve & RetrieveMultiple
- Must Implement QueryExpression or LINQ
Demo
Custom Data Provider
Conclusion
- Hope CRUD feature arrives soon
- Performance may affect from external systems
- OData V4 Data Provider is recommended
- CosmosDB Provider looks promising
- Custom Data Provider is good for 3rd party vendors
- ...
- Any points from audience?