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

ChallaChalla
4 min read

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

Fno Layer Hierarchy

LayerNameWhat it ContainsWho Controls ItKey Characteristic
7CUS (Customer)Customer-specific customizationsEnd customers and their implementation partnersHighest layer in the hierarchy; where most custom development happens
6VAR (Value-Added Reseller)Partner customizations for multiple customersMicrosoft partnersCustomizations that apply to multiple clients
5ISV (Independent Software Vendor)Third-party applications and extensionsSolution providersReusable across multiple customer implementations
4FPK (Feature Pack)Additional features released between major updatesMicrosoftDelivers new capabilities incrementally without requiring a full platform update
3GLS (Global Solution)Country/region-specific functionalityMicrosoftContains regulatory features for different countries; includes tax calculations and reports
2SYP (System Partner)Extensions by certified Microsoft partnersMicrosoft-certified ISVs onlyRarely used by most developers; reserved for special partners
1SYS (System)Microsoft's core application codeMicrosoft onlyNever 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 developerSYS, SYP, GLS, FPK
Creating a solution for multiple customersISV
A partner with multi-client customizationsVAR
Implementing for a specific customerCUS

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}

0
Subscribe to my newsletter

Read articles from Challa directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Challa
Challa