Skip to content

Adding your own pages

Out of the box, notifications can show on role centres and on the customer, vendor, item, sales and purchase pages. A developer can add any other page with a small page extension and an event subscriber in their own extension:

pageextension 50100 "My Page DNT" extends "My Page"
{
var
DNTNotifier: Codeunit "DNT Page Notifier";
trigger OnOpenPage()
begin
DNTNotifier.PageOpened(Page::"My Page");
end;
trigger OnAfterGetCurrRecord()
begin
DNTNotifier.RecordChanged(Rec);
end;
}
codeunit 50100 "My DNT Pages"
{
[EventSubscriber(ObjectType::Codeunit, Codeunit::"DNT Notification Mgt", 'OnCollectSupportedPages', '', false, false)]
local procedure AddMyPage(var PageIds: List of [Integer])
begin
PageIds.Add(Page::"My Page");
end;
}
  • The subscriber makes the page selectable under Show On Pages.
  • Keep DNTNotifier as a page variable: it remembers the page’s rules and the last record shown.
  • Your extension needs a dependency on Dynamic Notifications.