Dual-Write & Virtual Entities
Master real-time bidirectional sync between F&O and Dataverse with dual-write, access F&O data without copying using virtual entities, and integrate with the Power Platform.
Dual-Write & Virtual Entities
The Power Platform β Power Apps, Power Automate, Dataverse β is Microsoftβs low-code ecosystem. Every modern F&O deployment needs to connect to it. This module covers the two main bridges: dual-write (real-time sync) and virtual entities (live read access). Both solve the same fundamental problem β getting F&O data into the Power Platform world β but in very different ways.
Think of it like two offices sharing information.
Dual-write is like having a photocopier connected to both offices. When one office updates a document, the copier instantly creates a copy in the other office. Both offices always have the same documents. Fast to read, but you are maintaining two copies β and sometimes the copier jams (sync conflicts).
Virtual entities are like a window between the offices. When someone in the Power Platform office needs to see an F&O document, they look through the window and read it directly. No copies, no sync β but every time you look, you have to wait for the person on the other side to hold up the document.
Dual-Write: Real-Time Bidirectional Sync
Architecture
Dual-write is an infrastructure component that runs between F&O and Dataverse within the same Azure region. It is not a separate service you install β it is built into the platform.
How it works:
- A record changes in F&O (e.g., a customer is updated)
- The dual-write runtime detects the change via the entity framework
- It maps the F&O fields to the corresponding Dataverse table columns (via table maps)
- The mapped record is written to Dataverse β typically within 1-5 seconds
- The same process works in reverse β changes in Dataverse flow back to F&O
π Marcus explaining to Rafiq: βYour Power App for field sales reps needs customer data that is always current. Dual-write keeps the Dataverse customer table in sync with F&O β when the finance team updates a credit limit, the sales rep sees it in their app within seconds.β
Table Maps
Table maps define the field-level mapping between an F&O entity and a Dataverse table.
- Microsoft provides pre-built table maps for common entities (Customers, Vendors, Products, Sales Orders)
- You can customise maps to include additional fields or custom columns
- Maps can include transformations β e.g., mapping an F&O enum to a Dataverse option set
- Each map has an initial sync option to bulk-load existing data before real-time sync begins
Initial Sync
Before dual-write starts real-time syncing, you typically run an initial sync to align existing data:
- Choose a master for the initial load (F&O β Dataverse, or Dataverse β F&O)
- Run the initial sync β this is a bulk copy operation
- After completion, real-time bidirectional sync takes over
π Marcusβs initial sync lesson: βRafiq asked βwhat if both systems already have customer data?β Good question. Initial sync has conflict resolution β you pick a master. But honestly? Clean up one side first. Running initial sync with data in both systems is a recipe for duplicates.β
Exam tip: Initial sync direction
The exam may ask about initial sync. Remember: you choose ONE direction for initial sync (e.g., F&O is the master, data flows to Dataverse). This is a one-time operation. After that, real-time sync is bidirectional. If you choose the wrong master, you overwrite good data in the target system.
Error Handling and Troubleshooting
Dual-write can fail for several reasons:
| Error Type | Cause | Resolution |
|---|---|---|
| Validation failure | Data doesnβt pass entity validation in the target | Fix source data, re-sync record |
| Key conflict | Duplicate key in the target system | Resolve duplicate, re-sync |
| Plugin failure | Dataverse plugin throws an error | Fix the plugin or disable for dual-write |
| Connection issue | Network/auth failure between systems | Check connectivity, re-authenticate |
| Schema mismatch | Field mapping references a column that doesnβt exist | Update table map to match current schema |
Error logs are available in:
- F&O: Data management workspace β Dual-write β Error log
- Dataverse: Advanced find on the dual-write error table
Virtual Entities: Read Without Copy
Virtual entities take the opposite approach β no data is copied. Instead, Dataverse creates a βvirtual tableβ that proxies all queries to F&O in real time.
How it works
- An admin enables a virtual entity for a specific F&O data entity in Dataverse
- A virtual table appears in Dataverse with the same fields as the F&O entity
- When a Power App or Power Automate flow queries this table, the request is routed live to F&O via OData
- F&O returns the data, and Dataverse passes it to the consumer
- No data is stored in Dataverse β it is fetched every time
π Marcus to Rafiq: βFor your lookup scenarios β where the Power App just needs to display a list of warehouses or product categories β virtual entities are perfect. No sync to manage, no data duplication, always current. The trade-off? Every query hits F&O, so performance depends on F&O being responsive.β
Setting up virtual entities
- Install the Finance and Operations Virtual Entity solution in Dataverse
- Configure the virtual entity data source (F&O environment URL, authentication)
- Browse available F&O entities in the Dataverse admin centre
- Enable the entities you need β they appear as virtual tables
- Use them in Power Apps, Power Automate, or any Dataverse-connected tool
Limitations
- Read-only by default β write-back requires additional configuration and isnβt supported for all entities
- Performance β every query goes to F&O (no local cache), so complex queries or large datasets are slow
- Offline not supported β if F&O is down, virtual entity queries fail
- Limited filter/sort β not all OData query features translate to virtual table queries
| Aspect | Dual-Write | Virtual Entities |
|---|---|---|
| Data location | Copied to both F&O and Dataverse | Only in F&O (read-through) |
| Sync timing | Near-real-time (1-5 seconds) | On-demand (live query) |
| Direction | Bidirectional | Primarily read from F&O |
| Write support | Full CRUD both directions | Read-only by default |
| Offline access | Yes (data in Dataverse) | No (requires F&O online) |
| Performance | Fast reads (local data) | Depends on F&O response time |
| Setup complexity | Higher (table maps, initial sync) | Lower (enable entity) |
| Data freshness | Near-real-time (seconds) | Always current (live) |
| Best for | Core entities (Customers, Products, Orders) | Lookups, reference data, reporting |
| Conflict risk | Yes (both systems write) | No (single source of truth) |
Power Platform Integration
Power Apps with F&O Data
Power Apps can access F&O data through three paths:
| Method | When to Use |
|---|---|
| Dual-write | App needs fast reads AND writes to core entities |
| Virtual entities | App needs read-only lookups or reference data |
| F&O connector | Direct OData calls for specific operations |
π Marcus to Rafiq: βYour field service app needs customer data with write-back for visit notes? Dual-write. Your warehouse lookup app just needs to display product info? Virtual entity. Your approval app triggers a custom service? F&O connector with OData.β
Power Automate with F&O
Power Automate has a Finance and Operations connector that supports:
- Triggers: When a record is created, updated, or deleted (via business events)
- Actions: Get, create, update, delete records via OData
- Batch operations: Execute data entity operations in bulk
- Custom actions: Call custom services directly
Common patterns:
- Sales order approved in F&O β business event β Power Automate β send email
- Document uploaded to SharePoint β Power Automate β call F&O custom service to attach
- F&O inventory below threshold β business event β Power Automate β create Teams alert
Excel Integration via OData
F&O has built-in Open in Excel functionality that uses OData:
- Users can open any data entity in Excel directly from F&O
- Excel connects to F&O via OData and the Dynamics Office Add-in
- Changes in Excel are pushed back to F&O via OData
- Supports both interactive editing and bulk updates
π Marcus to Anita: βYour finance team wants to mass-update vendor payment terms? They donβt need a developer. Open the Vendors entity in Excel, update the column, click Publish. OData handles the write-back. Just make sure they donβt try to update 10,000 rows at once β OData has limits.β
Exam tip: Excel integration uses OData, not DMF
The exam may try to confuse Excelβs Open in Office with DMF export-to-Excel. They are different things. Open in Excel uses OData (synchronous, interactive, limited volume). DMF export creates an Excel/CSV file via the Data Management Framework (asynchronous, bulk). If the question mentions βinteractive editing in Excelβ, it is the OData-based Open in Excel feature.
Choosing Your Integration Path
Use this decision tree for exam scenarios:
Q: Does the Power Platform app need to write data back to F&O?
- No β Virtual entities (simplest)
- Yes β Continueβ¦
Q: Does the app need offline access or sub-second reads?
- Yes β Dual-write (data is local in Dataverse)
- No β F&O connector (direct OData)
Q: Is this core reference data used by many apps?
- Yes β Dual-write (single sync, many consumers)
- No β Virtual entity or direct connector
Q: Is the data volume massive and reads are infrequent?
- Yes β Virtual entity (avoid syncing data no one reads)
Real-world: Marcus's hybrid architecture
NexBridgeβs final architecture for Anitaβs deployment:
- Dual-write: Customers, Vendors, Products β core entities used by multiple Power Apps and Dataverse workflows. Updated constantly, need fast reads.
- Virtual entities: Warehouses, Units of Measure, Payment Terms β reference data that rarely changes, used for dropdown lookups in Power Apps.
- F&O connector: Custom service calls for inventory validation β the Power Automate flow needs to call specific business logic, not just read/write entities.
- Business events: Order confirmed, Invoice posted β trigger Power Automate flows for notifications and downstream processing.
Most real projects use all four. The exam tests whether you know which to use when.
Exam Practice
Rafiq is building a Power App that needs to display a list of F&O warehouses in a dropdown. The list rarely changes and the app doesn't need to update warehouse data. What should Marcus recommend?
A Power App for field sales reps needs to create new customer records and view their credit limits with sub-second performance. The reps sometimes work offline. Which integration should be used?
After running dual-write initial sync from F&O to Dataverse, some records failed with validation errors. Where can Marcus find the error details?
Which of the following is true about F&O virtual entities in Dataverse?
Next up: Business Events & Azure Integration β event-driven architecture, custom business events, Azure Service Bus and Event Grid endpoints, and Key Vault for secret management.