{"title":"Add and remove recommended content for Business Central tabs","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/devenv-develop-for-teams-tab-content/","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-develop-for-teams-tab-content, 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-develop-for-teams-tab-content","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 how to add or remove pages listed as recommended content in the Business Central tab configuration window.","date":"2023-12-22","meta":{"topic":"how-to"},"outline":[{"level":1,"title":"Add and remove recommended content for Business Central tabs","slug":"add-and-remove-recommended-content-for-business-central-tabs","at":0,"chars":3681},{"level":2,"title":"Introduction","slug":"introduction","at":210,"chars":2032},{"level":2,"title":"Add or remove","slug":"add-or-remove","at":2242,"chars":1278},{"level":2,"title":"Related information","slug":"related-information","at":3520,"chars":161}],"text":"# Add and remove recommended content for Business Central tabs\nThis article describes how to change the recommended content presented to users when setting up a Business Central tab in a Teams channel or chat.\n## Introduction\nWhen users add a Business Central tab in a Teams channel or chat, they have the option to select recommended content on the tab configuration window.\nBy default, the content users can choose from is based on their role center, specifically, the actions in the navigation menu and any bookmarked list page. The recommended content only supports list pages. For more information about how users can add tabs, see Add a Business Central Tab in Channels and Chats</across-teams-tab>.\nAs an AL developer, you can add or remove recommended content by subscribing to the OnAfterGetPageActions event, which has the following signature:\n```al\n[IntegrationEvent(false, false)]\ninternal procedure OnAfterGetPageActions(PageId: Integer; IncludeViews: Boolean; var ItemsJsonArray: JsonArray)\nbegin\nend;\n```\nThe event provides the ID of the current user's roles center and the ItemsJsonArray object. The ItemsJsonArray object contains information about the pages that show up in the recommended content list, including the caption and URL for the page and any of its views. The following code snippet shows an example of content inside the ItemsJsonArray:\n```json\n{\n    \"caption\": \"Customers\",\n    \"views\": [\n        {\n            \"caption\": \"balance\",\n            \"url\": \"https://businesscentral.dynamics.com/?company=CRONUS%20International%20Ltd.&page=22&view=aa49406f-6f68-4565-b857-496faa0e77aa_balance48453&page=22&filter=Customer.%27Balance%20(LCY)%27%20IS%20%27>200%27\"\n        }\n    ],\n    \"url\": \"https://businesscentral.dynamics.com/?company=CRONUS%20International%20Ltd.&page=22\"\n},\n{\n    \"caption\": \"Vendors\",\n    \"url\": \"https://businesscentral.dynamics.com/?company=CRONUS%20International%20Ltd.&page=27\"\n}\n```\nThis event is published by codeunit 2915 \"Page Action Provider\", which is part of the Page Action Provider module of the system application. For more information about this module, see BCApps repository<https://github.com/microsoft/BCApps/tree/main/src/System%20Application/App/Page%20Action%20Provider>.\n## Add or remove\nBy subscribing to the OnAfterGetPageActions event in your extension, you can hook into the ItemsJsonArray and add or remove recommended content. To subscribe the event, use the following method attribute:\n```al\n[EventSubscriber(ObjectType::Codeunit, Codeunit::\"Page Action Provider\", 'OnAfterGetPageActions', '', false, false)]\n```\nConsider the following code example. This example adds a custom page called My page to the recommended content list:\n```al\ncodeunit 50100 UpdateRecommendedContent\n{\n    trigger OnRun()\n    begin\n\n    end;\n\n    [EventSubscriber(ObjectType::Codeunit, Codeunit::\"Page Action Provider\", 'OnAfterGetPageActions', '', true, true)]\n    local procedure AddMyPageToRecommendedContent(PageId: Integer; IncludeViews: Boolean; var ItemsJsonArray: JsonArray)\n    begin\n        AddRecommendedPage(ItemsJsonArray, 'My page', GetUrl(ClientType::Web, CompanyName, ObjectType::Page, Page::MyPage));\n    end;\n\n    local procedure AddRecommendedPage(var ActionsArray: JsonArray; Caption: Text; Url: Text)\n    var\n        ActionsJsonObject: JsonObject;\n    begin\n        ActionsJsonObject.Add('caption', Caption);\n        ActionsJsonObject.Add('Url', Url);\n        ActionsArray.Add(ActionsJsonObject);\n    end;\n\n    var\n        myInt: Integer;\n}\n```\n## Related information\nDeveloping for Microsoft Teams Integration<devenv-develop-for-teams>\nCreate Business Central tabs for Teams<devenv-develop-for-teams-tabs>"}