{"title":"Extending application areas","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/devenv-extending-application-areas/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-extending-application-areas, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-extending-application-areas","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Learn about extending application areas in Business Central.","date":"2025-01-10","meta":{"topic":"concept-article"},"outline":[{"level":2,"title":"Extending application areas and the experience tier","slug":"extending-application-areas-and-the-experience-tier","at":279,"chars":1668},{"level":2,"title":"Adding an application area","slug":"adding-an-application-area","at":1947,"chars":4934},{"level":2,"title":"Adding Advanced application area to the Essentials and Premium experiences using an extension","slug":"adding-advanced-application-area-to-the-essentials-and-premium-experiences-using-an-extension","at":6881,"chars":2813},{"level":3,"title":"To enable Advanced in an extension","slug":"to-enable-advanced-in-an-extension","at":8002,"chars":1692},{"level":2,"title":"Application areas advantages and disadvantages","slug":"application-areas-advantages-and-disadvantages","at":9694,"chars":451},{"level":2,"title":"Related information","slug":"related-information","at":10145,"chars":462}],"text":"Application areas represent a feature in the system that offers developers, administrators, and users the ability to define differentiated user experiences.\nApplication areas are mapped to controls to show or hide them on page objects to enable more or fewer business scenarios.\n## Extending application areas and the experience tier\nIn this example you will:\n Add a new application area in the Application Area Setup table.\n Enable the application area in the OnInstallAppPerCompany trigger.\n Extend the experience tier in the OnGetExperienceAppArea event.\n Modify the experience tier (optional).\n Validate the application area in the OnValidateApplicationAreas.\n> IMPORTANT\n> The code used in this example is still under active development and might be subject to change in the future.\nThe following example extends the Customer List page. The field ExampleField is added and it's followed by a series of properties. The ApplicationArea property sets the application areas that apply to the control and in this code, ExampleAppArea is assigned to it.\n> IMPORTANT\n> If your extension fails to use ApplicationArea in any controls or actions, they won't be visible when you use an experience tier.\nThe OnOpenPage trigger displays the message only if ApplicationArea is enabled.\n```al\npageextension 50100 CustomerListExt extends \"Customer List\"\n{\n    layout\n    {\n        addafter(Name)\n        {\n            field(ExampleField; \"Name 2\")\n            {\n                Caption = 'Example Field';\n                ApplicationArea = ExampleAppArea;\n                ToolTip = 'This is a field added by an example extension';\n                Importance = Promoted;\n            }\n        }\n    }\n\n    trigger OnOpenPage()\n    var\n        EnableExampleExtension : Codeunit \"Enable Example Extension\";\n    begin\n        if EnableExampleExtension.IsExampleApplicationAreaEnabled() then\n            Message('App published: Example Extension');\n    end;\n}\n```\n## Adding an application area\nTo add an application area, the Application Area Setup table must be extended. A new boolean field is added and the name of this field is used in the attribute that you want to be tagged with this application area. This particular case, in the code example, is an exception, because space is used inside it. Usually, spaces are omitted in the application area attribute. At this point, the extension has an application area but it still needs to be enabled.\n> IMPORTANT\n> An application area tag must have the format name, where name is the application area. The name can be any combination of letters (Aa-Zz) and numbers (0-9) without spaces.\n```al\ntableextension 50100 \"Application Area Setup\" extends \"Application Area Setup\"\n{\n    fields\n    {\n        // Spaces in field name are omitted in the ApplicationArea attribute\n        // e.g. ApplicationArea = ExampleAppArea;\n        field(50100;\"Example App Area\";Boolean)\n        {\n        }\n    }\n}\n```\nThe codeunit Install Example Extension is of the subtype Install and it enables the application area inside the OnInstallAppPerCompany trigger.\n```al\ncodeunit 50101 \"Install Example Extension\"\n{\n    Subtype = Install;\n\n    trigger OnInstallAppPerCompany()\n    var\n        EnableApplicationArea : Codeunit \"Enable Example Extension\";\n    begin\n        if(EnableApplicationArea.IsExampleApplicationAreaEnabled()) then\n            exit;\n\n        EnableApplicationArea.EnableExampleExtension();\n\n        // Add your code here\n    end;\n}\n```\nThe registration of the application area inside an experience tier is made inside the OnGetEssentialExperienceAppArea. There are different versions of this event, one for each experience tier and in this case, Essential is chosen. This makes the extension visible inside the Essential experience and the event exposes an Application Area Setup temporary record; TempApplicationAreaSetup, to the Application Area Setup table. At this point, to enable the application area, this must be set to true.\n> NOTE\n> This event is important because it's called every single time an experience tier is reset, which can happen because of many reasons.\nAnother thing that is possible inside these methods is to modify the experience tier. You can also modify other application areas, such as creating an extension that extends the Fixed Assets functionality.\nBy subscribing to OnValidateApplicationAreas, the application area inside an experience tier is validated. OnValidateApplicationAreas is guaranteed to be executed after the events in the OnGet...ExperienceAppArea family. The validation is necessary in the presence of extensions concurrently manipulating the same application areas.\nIn case a needed application area isn't enabled, the suggested action is to show an error and turn off the extension to avoid unintended behavior. However, if the functionality controlled by this application area is of secondary importance and its loss doesn't affect the rest of the extension, it's also appropriate to keep the extension enabled.\n```al\ncodeunit 50100 \"Enable Example Extension\"\n{\n    // Extend and modify Essential experience tier with \"Example App Area\"\n    [EventSubscriber(ObjectType::Codeunit, Codeunit::\"Application Area Mgmt.\", 'OnGetEssentialExperienceAppAreas', '', false, false)]\n    local procedure RegisterExampleExtensionOnGetEssentialExperienceAppAreas(var TempApplicationAreaSetup: Record \"Application Area Setup\" temporary)\n    begin\n        TempApplicationAreaSetup.\"Example App Area\" := true;\n        // Modify other application areas here\n    end;\n\n    // Validate that application areas needed for the extension are enabled\n    [EventSubscriber(ObjectType::Codeunit, Codeunit::\"Application Area Mgmt.\", 'OnValidateApplicationAreas', '', false, false)]\n    local procedure VerifyApplicationAreasOnValidateApplicationAreas(ExperienceTierSetup: Record \"Experience Tier Setup\"; TempApplicationAreaSetup: Record \"Application Area Setup\" temporary)\n    begin\n        if ExperienceTierSetup.Essential then\n            if not TempApplicationAreaSetup.\"Example App Area\" then\n                Error('Example App Area should be part of Essential in order for the Example Extension to work.');\n    end;\n\n    // Helpers ................................................................\n    procedure IsExampleApplicationAreaEnabled() : Boolean\n    var\n        ApplicationAreaSetup: Record \"Application Area Setup\";\n        ApplicationAreaMgmtFacade: Codeunit \"Application Area Mgmt. Facade\";\n    begin\n        if ApplicationAreaMgmtFacade.GetApplicationAreaSetupRecFromCompany(ApplicationAreaSetup, CompanyName()) then\n            exit(ApplicationAreaSetup.\"Example App Area\");\n    end;\n\n    procedure EnableExampleExtension()\n    var\n        ApplicationAreaMgmtFacade: Codeunit \"Application Area Mgmt. Facade\";\n    begin\n        ApplicationAreaMgmtFacade.RefreshExperienceTierCurrentCompany();\n    end;\n}\n```\n## Adding Advanced application area to the Essentials and Premium experiences using an extension\nIf you're familiar with Dynamics NAV you'll have noticed that Dynamics 365 Business Central isn't exposing all the controls/actions that you find in Dynamics NAV. These controls have been hidden so far by using the application area Advanced, which isn't assigned to any experiences. See https://learn.microsoft.com/dynamics365/business-central/across-faq.\nMost of these fields become available/visible soon, but until then you have to create an extension to get (almost) the same experience as you have in Dynamics NAV. See the example<#to-enable-advanced-in-an-extension> below.\n> IMPORTANT\n> Adding the application area Advanced to the experience means that you lose some of the simplification made to pages. For example, you see more actions duplicated on many pages, compared to Business Central where the experience is intended to be simpler than in Dynamics NAV. You must also consider that we plan to re-tag the Advanced actions/controls and add them to the Essentials and/or Premium experiences in a future release.\n### To enable Advanced in an extension\nDepending on which experience you want to enable Advanced for you can subscribe to OnGetEssentialExperienceAppAreas or OnGetPremiumExperienceAppAreas. If you've defined your own experience, you must subscribe to OnSetExperienceTier.\nThe experiences are additive so you only need to subscribe to one of the events. For example, to enable Essentials and\nPremium experiences you only need to subscribe to OnGetEssentialExperienceAppAreas.\n```al\ncodeunit 50102 EnableAdvancedApplicationArea\n{\n    [EventSubscriber(ObjectType::Codeunit, Codeunit::\"Application Area Mgmt. Facade\", 'OnGetEssentialExperienceAppAreas', '', false, false)]\n    local procedure EnableAdvancedApplicationAreaOnGetEssentialExperienceAppAreas(var TempApplicationAreaSetup: Record \"Application Area Setup\" temporary)\n    begin\n        TempApplicationAreaSetup.Advanced := true;\n    end;\n\n    [EventSubscriber(ObjectType::Codeunit, Codeunit::\"Application Area Mgmt. Facade\", 'OnGetPremiumExperienceAppAreas', '', false, false)]\n    local procedure EnableAdvancedApplicationAreaOnGetPremiumExperienceAppAreas(var TempApplicationAreaSetup: Record \"Application Area Setup\" temporary)\n    begin\n        TempApplicationAreaSetup.Advanced := true;\n    end;\n\n    [EventSubscriber(ObjectType::Codeunit, Codeunit::\"Application Area Mgmt. Facade\", 'OnSetExperienceTier', '', false, false)]\n    local procedure EnableAdvancedApplicationAreaOnSetExperienceTier(ExperienceTierSetup: Record \"Experience Tier Setup\"; var TempApplicationAreaSetup: Record \"Application Area Setup\" temporary; var ApplicationAreasSet: Boolean)\n    begin\n        TempApplicationAreaSetup.Advanced := true;\n    end;\n}\n\n```\n## Application areas advantages and disadvantages\nIf you decide to code application areas as an extension, there are some aspects that must be considered. Application areas enable hiding entire business scenarios and you can have the same code base, which makes it possible to quickly modify the UI for different business scenarios or audiences. However, tagging errors as missing tags or incorrect tags occur and every single control must be tagged.\n## Related information\nModule System Application<https://learn.microsoft.com/dynamics365/business-central/application/system-application/module/system-application/>\nModule Base Application<https://learn.microsoft.com/dynamics365/business-central/application/base-application/module/base-application>\nproperties/devenv-applicationarea-property\nApplicationArea Method<methods-auto/library>\nproperties/devenv-accessbypermission-property\nproperties/devenv-properties"}