{"title":"Codeunit 79 Sales-Post and Send, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/79-sales-post-and-send/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-10-05","object":{"type":"codeunit","id":79,"name":"Sales-Post and Send","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/79-sales-post-and-send/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/79-sales-post-and-send/source/","path":"src/Layers/W1/BaseApp/Sales/Posting/SalesPostandSend.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:9070":{"name":"Document Errors Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/9070-document-errors-mgt/"},"table:60":{"name":"Document Sending Profile","url":"https://jonas-paprotka.de/ref/table/60-document-sending-profile/"},"codeunit:81":{"name":"Sales-Post (Yes/No)","url":"https://jonas-paprotka.de/ref/codeunit/81-sales-post-yes-no/"},"codeunit:99":{"name":"Posting Selection Management","url":"https://jonas-paprotka.de/ref/codeunit/99-posting-selection-management/"},"codeunit:80":{"name":"Sales-Post","url":"https://jonas-paprotka.de/ref/codeunit/80-sales-post/"},"codeunit:1630":{"name":"Office Management","url":"https://jonas-paprotka.de/ref/codeunit/1630-office-management/"},"page:365":{"name":"Post and Send Confirmation","url":"https://jonas-paprotka.de/ref/page/365-post-and-send-confirmation/"},"table:61":{"name":"Electronic Document Format","url":"https://jonas-paprotka.de/ref/table/61-electronic-document-format/"}},"procs":[{"name":"OnRun","line":21,"kind":"trigger","steps":[[24,"ext","codeunit",9070,"GetNothingToPostErrorMsg",0],[27,"call","Code",0]]},{"name":"Code","line":36,"kind":"procedure","access":"local","params":0,"steps":[[47,"event","OnBeforePostAndSend",0],[53,"call","ConfirmPostAndSend",2],[58,"event","OnCodeOnAfterConfirmPostAndSend",0],[60,"ext","table",60,"CheckElectronicSendingEnabled",0],[61,"call","ValidateElectronicFormats",1],[64,"event","OnCodeOnBeforePostSalesHeader",1],[69,"ext","codeunit",81,"PostAndSend",1],[74,"ext","codeunit",99,"CheckUserCanInvoiceSales",0],[75,"run","codeunit",80],[78,"event","OnAfterPostAndBeforeSend",0],[82,"ext","codeunit",80,"SendPostedDocumentRecord",2],[84,"event","OnAfterPostAndSend",0]]},{"name":"ConfirmPostAndSend","line":87,"kind":"procedure","access":"local","params":2,"steps":[[95,"event","OnBeforeConfirmPostAndSend",1],[100,"ext","codeunit",1630,"IsAvailable",0],[101,"ext","table",60,"GetOfficeAddinDefault",2],[101,"ext","codeunit",1630,"AttachAvailable",0],[104,"event","OnConfirmPostAndSendOnBeforeGetDocumentSendingProfile",1],[107,"ext","table",60,"GetDefault",1],[111,"ext","table",60,"SetDocumentUsage",1],[112,"write",60,"Insert"],[115,"event","OnBeforeConfirmAndSend",1],[118,"run","page",365]]},{"name":"ValidateElectronicFormats","line":125,"kind":"procedure","access":"local","params":1,"steps":[[131,"event","OnBeforeValidateElectronicFormats",1],[137,"ext","table",61,"ValidateElectronicFormat",1],[138,"ext","table",61,"ValidateElectronicSalesDocument",2],[144,"ext","table",61,"ValidateElectronicFormat",1],[145,"ext","table",61,"ValidateElectronicSalesDocument",2],[149,"ext","table",61,"ValidateElectronicFormat",1],[150,"ext","table",61,"ValidateElectronicSalesDocument",2]]}]}