{"title":"Codeunit 1305 Sales-Quote to Invoice, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/1305-sales-quote-to-invoice/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":1305,"name":"Sales-Quote to Invoice","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/1305-sales-quote-to-invoice/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/1305-sales-quote-to-invoice/source/","path":"src/Layers/W1/BaseApp/Sales/Document/SalesQuotetoInvoice.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":{"table:18":{"name":"Customer","url":"https://jonas-paprotka.de/ref/table/18-customer/"},"table:36":{"name":"Sales Header","url":"https://jonas-paprotka.de/ref/table/36-sales-header/"},"table:44":{"name":"Sales Comment Line","url":"https://jonas-paprotka.de/ref/table/44-sales-comment-line/"},"table:37":{"name":"Sales Line","url":"https://jonas-paprotka.de/ref/table/37-sales-line/"},"codeunit:5063":{"name":"ArchiveManagement","url":"https://jonas-paprotka.de/ref/codeunit/5063-archivemanagement/"},"table:98":{"name":"General Ledger Setup","url":"https://jonas-paprotka.de/ref/table/98-general-ledger-setup/"},"codeunit:99000832":{"name":"Sales Line-Reserve","url":"https://jonas-paprotka.de/ref/codeunit/99000832-sales-line-reserve/"},"codeunit:447":{"name":"Record Link Management","url":"https://jonas-paprotka.de/ref/codeunit/447-record-link-management/"},"table:9510":{"name":"Email Parameter","url":"https://jonas-paprotka.de/ref/table/9510-email-parameter/"}},"procs":[{"name":"OnRun","line":22,"kind":"trigger","steps":[[31,"event","OnBeforeOnRun",0],[44,"ext","table",18,"CheckBlockedCustOnDocs",4],[49,"event","OnRunOnBeforeRunLineChecks",0],[52,"call","CheckForAssembleToOrderLines",1],[58,"call","CreateSalesInvoiceHeader",2],[59,"call","CreateSalesInvoiceLines",3],[60,"event","OnAfterInsertAllSalesInvLines",0],[63,"call","ArchiveSalesQuote",1],[67,"write",36,"Modify"],[69,"call","UpdateEmailParameters",1],[72,"event","OnBeforeDeletionOfQuote",1],[74,"ext","table",44,"DeleteComments",2],[77,"write",37,"DeleteAll"],[83,"event","OnAfterOnRun",0]]},{"name":"ArchiveSalesQuote","line":93,"kind":"procedure","access":"local","params":1,"steps":[[99,"event","OnBeforeArchiveSalesQuote",1],[105,"ext","codeunit",5063,"ArchSalesDocumentNoConfirm",1],[107,"ext","codeunit",5063,"ArchiveSalesDocument",1]]},{"name":"CreateSalesInvoiceHeader","line":120,"kind":"procedure","access":"local","params":2,"steps":[[131,"event","OnCreateSalesInvoiceHeaderOnBeforeSalesInvoiceHeaderInsert",0],[132,"write",36,"Insert",1],[138,"ext","table",36,"InitFromSalesHeader",1],[139,"ext","table",98,"GetVATDate",2],[140,"validate",36,"Posting Date"],[142,"event","OnBeforeInsertSalesInvoiceHeader",0],[143,"write",36,"Modify"]]},{"name":"CreateSalesInvoiceLines","line":146,"kind":"procedure","access":"local","params":3,"steps":[[155,"event","OnAfterSalesQuoteLineSetFilters",0],[159,"event","OnBeforeCreateSalesInvoiceLineLoop",1],[165,"ext","table",37,"DefaultDeferralCode",0],[166,"ext","table",37,"InitQtyToShip",0],[167,"event","OnBeforeInsertSalesInvoiceLine",0],[168,"write",37,"Insert"],[170,"ext","codeunit",99000832,"TransferSaleLineToSalesLine",3],[171,"ext","codeunit",99000832,"VerifyQuantity",2],[172,"event","OnAfterInsertSalesInvoiceLine",0],[176,"call","MoveLineCommentsToSalesInvoice",2],[178,"event","OnCreateSalesInvoiceLinesOnBeforeSalesQuoteLineDeleteAll",0]]},{"name":"MoveLineCommentsToSalesInvoice","line":181,"kind":"procedure","access":"local","params":2,"steps":[[186,"ext","table",44,"CopyComments",4],[188,"ext","codeunit",447,"CopyLinks",2]]},{"name":"UpdateEmailParameters","line":191,"kind":"procedure","access":"local","params":1,"steps":[[197,"write",9510,"DeleteAll"]]}]}