Have you ever had the need to dynamically retrieve the details (name, page type, caption, visible fields, related tooltips etc.) of a given Dynamics 365 Business Central page?
Dynamics 365 Business Central introduces some system tabels containing page details, but most of them have Scope = OnPrem (so cannot be used, right? ).
Some of them, like “Page Action” table or “Page Control Field” table can be used on SaaS but they are not fully complete.
For this scope, Dynamics 365 Business Central has silently introduced a misterious codeunit called Page Summary Provider. This codeunit exposes functionality that gets page summary for a selected page and it works at the page metadata level by wrapping a set of API calls to retrieve the page details:
The Page Summary Provider codeunit contains a set of methods for retrieving those page-related details that are not so clear on how they must be used. Let’s explore them…
To retrieve the details of a Dynamics 365 Business Central page, you can use the GetPageSummary or the GetPageSummaryBySystemID methods. These methods gives you a Text response containing a JSON of page details.
But the response of these methods differs accordingly to the method’s overload used. Let’s see some examples.
You can retrieve the page summary details of a given page (Vendor List page in my example) by calling the GetPageSummary method and passing the ID of the page:
procedure GetPageSummary(PageId: Integer): Text
Response is the following:
As you can see, you have only the basic details of the selected page.
The GetPageSummary method has also a second overload, that permits you to pass the page ID and the bookmark ID of the page for which you want to retrieve the details:
procedure GetPageSummary(PageId: Integer, Bookmark: Text): Text
The bookmark is a particular ID linied to the diplayed page and available in the page url:
If you call this method, response is the following:
Now you have a JSON response containing the complete page details. But here the problem is: how can I have the page bookmark?
If the page contains at least one record, you can retrieve the page URL with the GetPageUrlBySystemID method:
procedure GetPageUrlBySystemID(PageId: Integer, SystemId: Guid): Text
and passing the ID of the page and the SystemId of a record in the page:
and here you have the full url, complete with the page bookmark:
Always by using the SystemId of a record in the page, you can retrieve the full page details directly by using the GetPageSummaryBySystemID method:
procedure GetPageSummaryBySystemID(PageId: Integer, SystemId: Guid): Text
and here is the response (full page details):
This is quite tricky but it’s the only available way (at least from code) to retrieve page details related to displayed fields (caption and tooltips).
Original Post https://demiliani.com/2025/01/09/dynamics-365-business-central-the-misterious-page-summary-provider-codeunit/