Everything You Need to Know About Virtual Tables in Microsoft Dataverse (CRM Online)

 Introduction

Have you ever needed to connect Microsoft Dataverse (CRM Online) with an external system without duplicating data? That's exactly where Virtual Tables (formerly known as Virtual Entities) come in. Instead of importing data, Virtual Tables allow you to access external data in real-time—as if it were stored in Dataverse.

In this blog, we’ll break down everything you need to know about Virtual Tables, how they work, and how to implement them in Microsoft Dataverse (CRM Online).


What Are Virtual Tables?

A Virtual Table in Dataverse is a special type of table that connects to an external data source. Unlike regular tables, virtual tables don’t store data in Dataverse. Instead, they act as a “bridge” to display and interact with external data in real-time.

Key Benefits:

No Data Duplication: Access external data without importing it into Dataverse.
Real-Time Access: Always get the latest data from the external system.
Seamless Integration: Works just like a regular table inside Dataverse.
Low Maintenance: No need to sync or update records manually.


When Should You Use Virtual Tables?

Virtual Tables are ideal for scenarios where:

  • You need to integrate ERP systems, SQL databases, or web services with Dataverse.

  • You want to access real-time data instead of storing redundant copies.

  • Your external system contains large volumes of data, making data import impractical.

  • You need to extend Dataverse functionality without increasing storage costs.


How Virtual Tables Work

Virtual Tables rely on an external data provider to fetch and display records in Dataverse. Here’s a high-level overview of how they work:

  1. Define an External Data Source (such as an OData API, SQL Database, or a custom data provider).

  2. Create a Virtual Table in Dataverse and link it to the external data source.

  3. Map External Fields to Dataverse table fields.

  4. Use the Table Like a Regular Table in Model-Driven Apps, Canvas Apps, and Power Automate.

Dataverse queries the external system on-demand, ensuring that data is always fresh and up to date.


Implementing Virtual Tables in Microsoft Dataverse

Let’s go through the step-by-step process to set up a Virtual Table.

Step 1: Set Up an External Data Source

Before creating a Virtual Table, you need to register an external data source. Dataverse supports various external sources, including:

  • OData v4 Web Services (REST APIs that expose data in JSON format)

  • SQL Server (On-premises or Azure SQL Database)

  • Custom Data Providers (For other data sources)

Using OData v4:

  1. In Power Apps, go to Dataverse → Tables.

  2. Click Settings (⚙) → Advanced Settings → Administration → Virtual Entity Data Sources.

  3. Click New and select OData v4 Data Provider.

  4. Enter the OData URL (e.g., https://yourapi.com/odata/).

  5. Test the connection and save the data source.


Step 2: Create a Virtual Table in Dataverse

  1. In Power Apps, navigate to Dataverse → Tables.

  2. Click + New table, then enable Virtual Table.

  3. Choose the external data source you set up in Step 1.

  4. Provide a name and primary key (must match the external system’s ID).

  5. Define the fields and map them to corresponding fields in the external data source.

  6. Save and publish the table.


Step 3: Test Your Virtual Table

After creating the Virtual Table: ✅ Go to Dataverse and open the table → You should see live data from the external system.
Try adding, updating, or deleting records (if supported by the data source).
Use it in Model-Driven Apps, Canvas Apps, or Power Automate.


Common Issues & Troubleshooting

🔴 Virtual Table Not Showing Data?

  • Ensure the OData v4 URL is correct and accessible.

  • Verify that the primary key matches the external system’s key.

  • Check if the external system supports OData queries.

🔴 Records Not Editable?

  • Virtual Tables are read-only by default. You need to configure the external data provider for CRUD operations.

🔴 Performance Issues?

  • Since Virtual Tables query external data in real-time, slow APIs or database queries can affect performance. Optimize the external system where possible.


Final Thoughts

Virtual Tables are a powerful way to integrate external data with Microsoft Dataverse without importing or storing it. If your business deals with real-time data from different systems, this is the best way to keep everything connected and accessible in CRM Online.

Key Takeaways:

✔ Virtual Tables provide real-time access to external data.
OData v4, SQL, and custom providers can be used as data sources.
✔ Requires proper schema mapping and data provider setup.
✔ Works seamlessly with Power Apps and Power Automate.

Now that you know how to set up Virtual Tables, try integrating them into your Microsoft Dataverse environment and see how they transform your data management! 🚀

Comments

Popular posts from this blog

Transforming Sri Lankan Healthcare Through Digital Governance: A Practical Roadmap

Azure Service Bus Integration with Microsoft Dynamics CRM Online

Enhancing a Stripe and MS CRM Integration Guide for Junior Developers