No Plugin, No Flow: Auto-Propagating Legal Entity Across 18 D365 Tables Using Formula Fields
Summary
- As part of our internal PO (Project Operations) to F&O integration product, every transaction needs to know which legal entity it belongs to — yet no out-of-box mechanism exists to propagate this across the 18+ connected tables involved.
- We built a zero-code, zero-maintenance solution using Dataverse formula fields: set Legal Entity once on Account, and every related record inherits it automatically.
- A custom Legal Entity table maps company master records to FO DataAreaId codes, and formula fields chain the value down through the entire relationship hierarchy.
- Three entities with polymorphic lookups blocked formula traversal — solved with a direct lookup field auto-populated via a Business Rule, requiring no user action.
- Business impact: eliminated manual per-record entry, removed CRM–FO mismatch risk, and replaced plugin/flow maintenance overhead with pure declarative formula fields.
Table of Contents
The Challenge
In our internal PO (Project Operations) to F&O integration product, every transaction needs to know which legal entity it belongs to — yet no out-of-box mechanism exists to auto-propagate this across the 18+ connected tables involved.
The traditional approach? Manual entry, plugins, or complex flows — all high maintenance, all error-prone.
What We Built
A zero-code, zero-maintenance auto-propagation solution using Dataverse formula fields — no plugin, no Power Automate flow for downstream entities.
How It Works
- One custom table — Legal Entity — stores company master records mapped to FO DataAreaId codes (e.g. ac, USMF).
- One manual input — user sets Legal Entity on Account. That’s it.
- Everything else is automatic — formula fields chain through the relationship hierarchy.
The One Technical Wall
Three entities — Contact, Salesorders, Invoices, Projects — use polymorphic lookup fields that block formula traversal.
Solved by adding a clean direct lookup — cf_accountref — populated automatically via a Business Rule. No user action needed.
The Outcome
| Before | After |
|---|---|
| Legal Entity entered manually per record | Set once on Account — cascades to 18 tables |
| Risk of mismatch between CRM and FO | Single source of truth — always in sync |
| Plugin or flow required for automation | Pure formula fields — zero maintenance |
| Existing records needed manual update | One-time bulk flow backfilled all records |
The Bigger Point
This isn’t just a technical pattern — it’s a data governance principle: in multi-entity implementations, master attributes should live at the top of the hierarchy and flow down automatically, not be re-entered at every level. Formula fields make this possible in Dataverse without a single line of code.
Frequently Asked Questions
Conclusion
Legal Entity tracking is a small field with outsized consequences — get it wrong, and financial reporting, cross-entity reconciliation, and downstream automation all inherit the error. The instinct in most implementations is to reach for a plugin or a flow to keep it in sync. This solution proves that’s not always necessary.
By anchoring Legal Entity at the top of the hierarchy on Account and letting Dataverse formula fields carry it down through 18 connected tables, we removed an entire category of maintenance — no custom code to patch, no flow runs to monitor, no throttling limits to worry about. The system simply stays correct by design.
It’s a reminder that the most resilient integrations are often the ones that need the least ongoing attention. When a platform-native feature can solve a problem cleanly, it usually outlasts a custom-built one.
About Me
Deepak Chauhan
Consultant and Databricks Certified Data Engineer with 4 years of experience across Dynamics 365, Data & AI, and BI.
Building Something Similar?
If you’re wrestling with multi-entity data consistency in Dataverse or D365, formula fields might solve more than you expect — before you reach for a plugin or a flow.
Get in Touch