{"title":"Codeunit 6041 Service Document Archive Mgmt., extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/6041-service-document-archive-mgmt/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":6041,"name":"Service Document Archive Mgmt.","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/6041-service-document-archive-mgmt/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/6041-service-document-archive-mgmt/source/","path":"src/Layers/W1/BaseApp/Service/Archive/ServiceDocumentArchiveMgmt.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:27":{"name":"Confirm Management","url":"https://jonas-paprotka.de/ref/codeunit/27-confirm-management/"},"codeunit:447":{"name":"Record Link Management","url":"https://jonas-paprotka.de/ref/codeunit/447-record-link-management/"},"table:6010":{"name":"Service Header Archive","url":"https://jonas-paprotka.de/ref/table/6010-service-header-archive/"},"table:6011":{"name":"Service Item Line Archive","url":"https://jonas-paprotka.de/ref/table/6011-service-item-line-archive/"},"table:6014":{"name":"Service Order Allocat. Archive","url":"https://jonas-paprotka.de/ref/table/6014-service-order-allocat-archive/"},"table:6012":{"name":"Service Line Archive","url":"https://jonas-paprotka.de/ref/table/6012-service-line-archive/"},"table:5900":{"name":"Service Header","url":"https://jonas-paprotka.de/ref/table/5900-service-header/"},"codeunit:416":{"name":"Release Service Document","url":"https://jonas-paprotka.de/ref/codeunit/416-release-service-document/"},"table:5950":{"name":"Service Order Allocation","url":"https://jonas-paprotka.de/ref/table/5950-service-order-allocation/"},"table:5901":{"name":"Service Item Line","url":"https://jonas-paprotka.de/ref/table/5901-service-item-line/"},"table:5902":{"name":"Service Line","url":"https://jonas-paprotka.de/ref/table/5902-service-line/"},"table:5906":{"name":"Service Comment Line","url":"https://jonas-paprotka.de/ref/table/5906-service-comment-line/"},"table:6013":{"name":"Service Comment Line Archive","url":"https://jonas-paprotka.de/ref/table/6013-service-comment-line-archive/"}},"procs":[{"name":"AutoArchiveServiceDocument","line":34,"kind":"procedure","params":1,"steps":[[40,"event","OnBeforeAutoArchiveServiceDocument",1],[51,"call","ArchServiceDocumentNoConfirm",1],[53,"call","ArchiveServiceDocument",1],[57,"call","ArchServiceDocumentNoConfirm",1],[60,"event","OnAfterAutoArchiveServiceDocument",0]]},{"name":"ArchServiceDocumentNoConfirm","line":63,"kind":"procedure","params":1,"steps":[[68,"event","OnBeforeArchServiceDocumentNoConfirm",1],[72,"call","StoreServiceDocument",2]]},{"name":"ArchiveServiceDocument","line":75,"kind":"procedure","params":1,"steps":[[81,"event","OnBeforeArchiveServiceDocument",1],[85,"ext","codeunit",27,"GetResponseOrDefault",2],[88,"call","StoreServiceDocument",2]]},{"name":"StoreServiceDocument","line":94,"kind":"procedure","access":"local","params":2,"steps":[[107,"event","OnBeforeStoreServiceDocument",1],[118,"call","GetNextVersionNo",4],[123,"ext","codeunit",447,"CopyLinks",2],[124,"event","OnBeforeServiceHeaderArchiveInsert",0],[125,"write",6010,"Insert"],[126,"event","OnAfterServiceHeaderArchiveInsert",0],[128,"call","StoreServiceDocumentComments",4],[139,"ext","codeunit",447,"CopyLinks",2],[140,"event","OnBeforeServiceItemLineArchiveInsert",0],[141,"write",6011,"Insert"],[152,"ext","codeunit",447,"CopyLinks",2],[153,"write",6014,"Insert"],[166,"ext","codeunit",447,"CopyLinks",2],[167,"event","OnBeforeServiceLineArchiveInsert",0],[168,"write",6012,"Insert"],[170,"event","OnAfterStoreServiceLineArchive",0],[173,"event","OnAfterStoreServiceDocument",0]]},{"name":"RestoreServiceDocument","line":176,"kind":"procedure","params":1,"steps":[[188,"event","OnBeforeRestoreServiceDocument",1],[199,"event","OnBeforeCheckIfDocumentIsPartiallyPosted",0],[214,"ext","codeunit",27,"GetResponseOrDefault",2],[224,"event","OnRestoreDocumentOnBeforeDeleteServiceHeader",0],[227,"write",5900,"Delete",1],[228,"event","OnRestoreDocumentOnAfterDeleteServiceHeader",0],[231,"ext","table",5900,"SetHideValidationDialog",1],[234,"event","OnBeforeServiceHeaderInsert",0],[235,"write",5900,"Insert",1],[236,"event","OnRestoreServiceDocumentOnAfterServiceHeaderInsert",0],[240,"event","OnRestoreServiceDocumentOnBeforeServiceHeaderValidateFields",0],[242,"validate",5900,"Contact No."],[244,"validate",5900,"Customer No."],[246,"validate",5900,"Bill-to Contact No."],[248,"validate",5900,"Bill-to Customer No."],[249,"validate",5900,"Salesperson Code"],[250,"validate",5900,"Payment Terms Code"],[251,"validate",5900,"Payment Discount %"],[255,"ext","codeunit",447,"CopyLinks",2],[256,"event","OnAfterTransferFromArchToServiceHeader",0],[257,"write",5900,"Modify",1],[258,"call","RestoreServiceLines",2],[260,"ext","codeunit",416,"Reopen",1],[262,"event","OnAfterRestoreServiceDocument",0]]},{"name":"RestoreServiceLines","line":269,"kind":"procedure","access":"local","params":2,"steps":[[280,"call","RestoreServiceLineComments",2],[290,"write",5950,"Insert",1],[291,"ext","codeunit",447,"CopyLinks",2],[298,"event","OnRestoreServiceLinesOnAfterServiceItemLineArchiveSetFilters",0],[303,"event","OnRestoreServiceLinesOnBeforeServiceItemLineInsert",0],[304,"write",5901,"Insert",1],[305,"event","OnRestoreServiceLinesOnAfterServiceItemLineInsert",0],[307,"validate",5901,"Service Item No."],[309,"validate",5901,"Variant Code"],[310,"validate",5901,"Description"],[315,"ext","codeunit",447,"CopyLinks",2],[316,"event","OnAfterTransferFromArchToServiceItemLine",0],[317,"write",5901,"Modify",1],[318,"event","OnAfterRestoreServiceItemLine",0],[325,"event","OnRestoreServiceLinesOnAfterServiceLineArchiveSetFilters",0],[330,"event","OnRestoreServiceLinesOnBeforeServiceLineInsert",0],[331,"write",5902,"Insert",1],[332,"event","OnRestoreServiceLinesOnAfterServiceLineInsert",0],[334,"validate",5902,"Service Item No."],[336,"validate",5902,"Variant Code"],[337,"validate",5902,"Description"],[340,"event","OnRestoreServiceLinesOnAfterCalcShouldValidateQuantity",0],[342,"validate",5902,"Quantity"],[343,"event","OnRestoreServiceLinesOnAfterValidateQuantity",0],[344,"validate",5902,"Unit Price"],[345,"validate",5902,"Unit Cost (LCY)"],[346,"validate",5902,"Line Discount %"],[348,"validate",5902,"Inv. Discount Amount"],[350,"validate",5902,"Amount"],[355,"ext","codeunit",447,"CopyLinks",2],[356,"event","OnAfterTransferFromArchToServiceLine",0],[357,"write",5902,"Modify",1],[358,"event","OnAfterRestoreServiceLine",0],[361,"event","OnAfterRestoreServiceLines",0]]},{"name":"RestoreServiceLineComments","line":364,"kind":"procedure","access":"local","params":2,"steps":[[378,"write",5906,"Insert"],[395,"event","OnRestoreServiceLineCommentsOnBeforeInsertServiceCommentLine",0],[396,"write",5906,"Insert"]]},{"name":"GetNextVersionNo","line":399,"kind":"procedure","access":"local","params":4,"steps":[[405,"event","OnBeforeGetNextVersionNo",1],[423,"event","OnGetNextVersionNo",0]]},{"name":"StoreServiceDocumentComments","line":429,"kind":"procedure","access":"local","params":4,"steps":[[442,"event","OnStoreServiceDocumentCommentsOnBeforeServiceCommentLineArchInsert",0],[443,"write",6013,"Insert"]]},{"name":"GetNextOccurrenceNo","line":447,"kind":"procedure","access":"internal","params":3,"steps":[[464,"event","OnGetNextOccurrenceNo",0]]}]}