{"title":"Codeunit 1509 Notification Entry Dispatcher, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/1509-notification-entry-dispatcher/points/","author":"JOP-AL","license":"Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/","subject":"Microsoft Dynamics 365 Business Central","checked":"2026-11-20","changed":"2026-11-06","object":{"type":"codeunit","id":1509,"name":"Notification Entry Dispatcher","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/1509-notification-entry-dispatcher/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/1509-notification-entry-dispatcher/source/","path":"src/Layers/W1/BaseApp/System/Notifications/NotificationEntryDispatcher.Codeunit.al","commit":"4303e5e584d3aa5d9e98cbc615525a5396ad6ed7","lines":"a line is <source url>#L<line>"},"steps":{"event":"[line, \"event\", name, handled]: raises an event of this object; handled 1 when it has an IsHandled parameter","call":"[line, \"call\", name, arguments]: calls a procedure of this object","ext":"[line, \"ext\", type, id, name, arguments]: calls a procedure of another object, through a variable declared with that type","write":"[line, \"write\", table id, method, 1 when called with true]: Insert, Modify, ModifyAll, Delete, DeleteAll or Rename","validate":"[line, \"validate\", table id, field name]","run":"[line, \"run\", type, id]: Codeunit.Run, Page.Run, Report.Run and their kin"},"objects":{"codeunit:28":{"name":"Error Message Management","url":"https://jonas-paprotka.de/ref/codeunit/28-error-message-management/"},"codeunit:29":{"name":"Error Message Handler","url":"https://jonas-paprotka.de/ref/codeunit/29-error-message-handler/"},"table:1512":{"name":"Notification Setup","url":"https://jonas-paprotka.de/ref/table/1512-notification-setup/"},"codeunit:4100":{"name":"Temp Blob","url":"https://jonas-paprotka.de/ref/codeunit/4100-temp-blob/"},"codeunit:260":{"name":"Document-Mailing","url":"https://jonas-paprotka.de/ref/codeunit/260-document-mailing/"},"codeunit:1510":{"name":"Notification Management","url":"https://jonas-paprotka.de/ref/codeunit/1510-notification-management/"},"codeunit:9520":{"name":"Mail Management","url":"https://jonas-paprotka.de/ref/codeunit/9520-mail-management/"},"table:1511":{"name":"Notification Entry","url":"https://jonas-paprotka.de/ref/table/1511-notification-entry/"},"codeunit:700":{"name":"Page Management","url":"https://jonas-paprotka.de/ref/codeunit/700-page-management/"},"codeunit:447":{"name":"Record Link Management","url":"https://jonas-paprotka.de/ref/codeunit/447-record-link-management/"},"table:2000000068":{"name":"Record Link","url":"https://jonas-paprotka.de/ref/table/2000000068-record-link/"},"table:9651":{"name":"Report Layout Selection","url":"https://jonas-paprotka.de/ref/table/9651-report-layout-selection/"},"report:1320":{"name":"Notification Email","url":"https://jonas-paprotka.de/ref/report/1320-notification-email/"},"codeunit:701":{"name":"Data Type Management","url":"https://jonas-paprotka.de/ref/codeunit/701-data-type-management/"}},"procs":[{"name":"OnRun","line":20,"kind":"trigger","steps":[[23,"call","DispatchInstantNotifications",0],[25,"call","DispatchNotificationTypeForUser",1]]},{"name":"DispatchInstantNotifications","line":50,"kind":"procedure","access":"local","params":0,"steps":[[59,"call","GetTempNotificationEntryFromTo",1],[63,"ext","codeunit",28,"Activate",1],[64,"ext","codeunit",28,"PushContext",4],[69,"call","ScheduledInstantly",2],[70,"call","DispatchForNotificationType",3],[73,"call","NotifyAboutForegroundDispatchErrors",1],[76,"ext","codeunit",28,"Finish",1]]},{"name":"NotifyAboutForegroundDispatchErrors","line":84,"kind":"procedure","access":"local","params":1,"steps":[[86,"ext","codeunit",29,"HasErrors",0],[91,"ext","codeunit",29,"NotifyAboutErrors",0]]},{"name":"DispatchNotificationTypeForUser","line":94,"kind":"procedure","access":"local","params":1,"steps":[[101,"event","OnBeforeDispatchNotificationTypeForUser",1],[107,"call","DispatchForNotificationType",3]]},{"name":"DispatchForNotificationType","line":110,"kind":"procedure","access":"local","params":3,"steps":[[117,"event","OnBeforeDispatchForNotificationType",1],[124,"call","DeleteOutdatedApprovalNotificationEntires",1],[129,"call","FilterToActiveNotificationEntries",1],[131,"ext","table",1512,"GetNotificationTypeSetupForUser",2],[133,"call","CreateAndDispatch",3],[136,"event","OnAfterDispatchForNotificationType",0]]},{"name":"CreateAndDispatch","line":139,"kind":"procedure","access":"local","params":3,"steps":[[141,"event","OnBeforeCreateAndDispatch",0],[144,"call","CreateMailAndDispatch",2],[146,"call","CreateNoteAndDispatch",1]]},{"name":"CreateMailAndDispatch","line":160,"kind":"procedure","access":"local","params":2,"steps":[[179,"call","GetHTMLBodyText",2],[184,"event","OnBeforeCreateMailAndDispatch",1],[188,"ext","codeunit",4100,"CreateInStream",1],[200,"call","GetTargetRecRef",2],[206,"call","MaximumRelatedEntries",0],[209,"ext","codeunit",260,"EmailFile",10],[213,"ext","codeunit",1510,"MoveNotificationEntryToSentNotificationEntries",4],[217,"event","OnCreateMailAndDispatchOnBeforeLogError",1],[221,"ext","codeunit",9520,"IsEnabled",0],[225,"write",1511,"Modify",1],[226,"ext","codeunit",28,"LogError",3],[230,"event","OnAfterCreateMailAndDispatch",0]]},{"name":"CreateNoteAndDispatch","line":233,"kind":"procedure","access":"local","params":1,"steps":[[239,"call","AddNote",2],[240,"ext","codeunit",1510,"MoveNotificationEntryToSentNotificationEntries",4]]},{"name":"AddNote","line":245,"kind":"procedure","access":"local","params":2,"steps":[[256,"call","GetTargetRecRef",2],[260,"ext","codeunit",700,"GetPageID",1],[261,"event","OnAddNoteOnAfterGetUrl",0],[265,"call","CreateNoteBody",2],[266,"ext","codeunit",447,"WriteNote",2],[272,"write",2000000068,"Insert",1],[273,"ext","codeunit",28,"LogError",3]]},{"name":"ConvertHtmlFileToText","line":288,"kind":"procedure","access":"local","params":2,"steps":[[292,"ext","codeunit",4100,"CreateInStream",1]]},{"name":"CreateNoteBody","line":296,"kind":"procedure","access":"local","params":2,"steps":[[304,"call","GetTargetRecRef",2],[305,"ext","codeunit",1510,"GetDocumentTypeAndNumber",3],[307,"ext","codeunit",1510,"GetActionTextFor",1],[308,"event","OnCreateNoteBodyOnAfterGetActionTextFor",0]]},{"name":"GetHTMLBodyText","line":313,"kind":"procedure","params":2,"steps":[[323,"event","OnBeforeGetHTMLBodyText",1],[329,"event","OnGetHTMLBodyTextOnAfterSetTempLayoutCode",0],[330,"ext","table",9651,"SetTempLayoutSelected",1],[332,"ext","codeunit",4100,"CreateOutStream",2],[333,"run","report",1320],[335,"write",1511,"Modify",1],[336,"ext","codeunit",28,"LogError",3],[341,"call","ConvertHtmlFileToText",2]]},{"name":"GetTargetRecRef","line":345,"kind":"procedure","params":2,"steps":[[354,"event","OnBeforeGetTargetRecRef",1],[358,"ext","codeunit",701,"GetRecordRef",2]]},{"name":"DeleteOutdatedApprovalNotificationEntires","line":376,"kind":"procedure","access":"local","params":1,"steps":[[380,"call","ApprovalNotificationEntryIsOutdated",1],[381,"write",1511,"Delete"]]},{"name":"ApprovalNotificationEntryIsOutdated","line":385,"kind":"procedure","access":"local","params":1,"steps":[[395,"event","OnBeforeApprovalNotificationEntryIsOutdated",1],[399,"ext","codeunit",701,"GetRecordRef",2]]},{"name":"GetTempNotificationEntryFromTo","line":418,"kind":"procedure","access":"local","params":1,"steps":[[424,"event","OnBeforeGetTempNotificationEntryFromTo",1],[435,"write",1511,"Insert"]]}]}