Understanding the D365 F&O Layered Model: A Beginner's Guide


If you've worked with Dynamics 365 Finance and Operations (D365 F&O), you've likely heard about its "layered architecture." This concept is fundamental to D365 F&O development, yet many struggle to grasp its importance and practical implications.
In this article, we'll break down the layered model in simple terms and explore why it matters for your development work.
What Is the Layered Model?
Think of the D365 F&O application as a multi-story building, where each floor represents a different layer of code. Microsoft built the foundation and lower floors, while partners and customers can add their own floors on top.
The beauty of this architecture? When Microsoft renovates the lower floors, your additions on the higher floors remain intact (if built correctly).
D365 F&O Layer Hierarchy
Layer | Name | What it Contains | Who Controls It | Key Characteristic |
7 | CUS (Customer) | Customer-specific customizations | End customers and their implementation partners | Highest layer in the hierarchy; where most custom development happens |
6 | VAR (Value-Added Reseller) | Partner customizations for multiple customers | Microsoft partners | Customizations that apply to multiple clients |
5 | ISV (Independent Software Vendor) | Third-party applications and extensions | Solution providers | Reusable across multiple customer implementations |
4 | FPK (Feature Pack) | Additional features released between major updates | Microsoft | Delivers new capabilities incrementally without requiring a full platform update |
3 | GLS (Global Solution) | Country/region-specific functionality | Microsoft | Contains regulatory features for different countries; includes tax calculations and reports |
2 | SYP (System Partner) | Extensions by certified Microsoft partners | Microsoft-certified ISVs only | Rarely used by most developers; reserved for special partners |
1 | SYS (System) | Microsoft's core application code | Microsoft only | Never directly modify anything here! Gets replaced during each update |
The Golden Rule: Dependency Direction
Allowed: Higher layers can see and reference elements in lower layers
Prohibited: Lower layers cannot reference or depend on higher layers
This one-way dependency rule ensures that Microsoft can update the lower layers without breaking your customizations in higher layers.
What Happens During Upgrades?
Understanding the impact of upgrades on layers is crucial:
Before upgrade*: All layers work together in harmony*
During upgrade*: Microsoft replaces the SYS, SYP, GLS, and FPK layers*
After upgrade*: Your customizations in ISV, VAR, and CUS remain on top of the new base layers*
Proper layering ensures minimal disruption during upgrades. When customizations follow the layering rules, they continue to work even when Microsoft changes the underlying layers.
How Extensions Work in the Layered Model
Extensions are the cornerstone of the D365 F&O customization strategy. Unlike traditional overlays (directly modifying Microsoft's code), extensions allow you to add functionality without changing the original code.
//sample code for mental model - treat as refernce
// Original method in SYS layer
// Original class in SYS layer
class OriginalClass
{
public void process()
{
info("Processing started");
// processing logic
info("Processing complete");
}
}
// Extension in CUS layer
[ExtensionOf(classStr(OriginalClass))]
final class OriginalClass_Extension
{
public void process()
{
next process(); // Call original method first
info("Custom processing finished"); // Then add custom logic
}
}
Extensions allow you to:
Add functionality without changing original code
Keep a clear separation between Microsoft's code and yours
Reduce upgrade conflicts
Practical Layer Selection Guidelines
When developing in D365 F&O, use these guidelines to choose the appropriate layer
If you are... | Use this layer |
A Microsoft developer | SYS, SYP, GLS, FPK |
Creating a solution for multiple customers | ISV |
A partner with multi-client customizations | VAR |
Implementing for a specific customer | CUS |
Conclusion
The D365 F&O layered model isn't just a technical concept, it's a crucial architectural principle that affects every aspect of your development work. By understanding and respecting layer boundaries, you ensure that your customizations remain upgrade-friendly and maintainable.
In our next article, we'll explore advanced extension techniques that use the layered model to create strong, upgrade-friendly customizations.
✨ Happy {coding}
Subscribe to my newsletter
Read articles from Challa directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
