{"title":"Codeunit 364 PostPurch-Delete, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/364-postpurch-delete/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":364,"name":"PostPurch-Delete","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/364-postpurch-delete/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/364-postpurch-delete/source/","path":"src/Layers/W1/BaseApp/Purchases/History/PostPurchDelete.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:120":{"name":"Purch. Rcpt. Header","url":"https://jonas-paprotka.de/ref/table/120-purch-rcpt-header/"},"table:121":{"name":"Purch. Rcpt. Line","url":"https://jonas-paprotka.de/ref/table/121-purch-rcpt-line/"},"table:6650":{"name":"Return Shipment Header","url":"https://jonas-paprotka.de/ref/table/6650-return-shipment-header/"},"table:6651":{"name":"Return Shipment Line","url":"https://jonas-paprotka.de/ref/table/6651-return-shipment-line/"},"table:122":{"name":"Purch. Inv. Header","url":"https://jonas-paprotka.de/ref/table/122-purch-inv-header/"},"table:123":{"name":"Purch. Inv. Line","url":"https://jonas-paprotka.de/ref/table/123-purch-inv-line/"},"table:124":{"name":"Purch. Cr. Memo Hdr.","url":"https://jonas-paprotka.de/ref/table/124-purch-cr-memo-hdr/"},"table:125":{"name":"Purch. Cr. Memo Line","url":"https://jonas-paprotka.de/ref/table/125-purch-cr-memo-line/"},"table:5805":{"name":"Item Charge Assignment (Purch)","url":"https://jonas-paprotka.de/ref/table/5805-item-charge-assignment-purch/"},"codeunit:6500":{"name":"Item Tracking Management","url":"https://jonas-paprotka.de/ref/codeunit/6500-item-tracking-management/"},"codeunit:361":{"name":"MoveEntries","url":"https://jonas-paprotka.de/ref/codeunit/361-moveentries/"}},"procs":[{"name":"DeleteHeader","line":35,"kind":"procedure","params":7,"steps":[[46,"event","OnBeforeDeleteHeader",1],[54,"call","InitDeleteHeader",8],[58,"write",120,"Insert"],[63,"write",121,"Insert"],[67,"write",6650,"Insert"],[72,"write",6651,"Insert"],[76,"write",122,"Insert"],[81,"write",123,"Insert"],[85,"write",124,"Insert",1],[90,"write",125,"Insert"],[94,"write",122,"Insert"],[98,"write",123,"Insert"],[102,"write",124,"Insert"],[107,"write",125,"Insert"],[110,"event","OnAfterDeleteHeader",0]]},{"name":"DeletePurchRcptLines","line":114,"kind":"procedure","params":1,"steps":[[122,"event","OnBeforeDeletePurchRcptLines",0],[124,"write",121,"Delete"],[127,"ext","table",5805,"CheckAssignment",3],[130,"ext","codeunit",6500,"DeleteItemEntryRelation",7],[133,"ext","codeunit",361,"MoveDocRelatedEntries",2]]},{"name":"DeletePurchInvLines","line":136,"kind":"procedure","params":1,"steps":[[143,"event","OnBeforeDeletePurchInvLines",0],[144,"write",123,"Delete"],[145,"ext","codeunit",6500,"DeleteValueEntryRelation",1],[145,"ext","table",123,"RowID1",0],[148,"ext","codeunit",361,"MoveDocRelatedEntries",2]]},{"name":"DeletePurchCrMemoLines","line":151,"kind":"procedure","params":1,"steps":[[158,"event","OnBeforeDeletePurchCrMemoLines",0],[159,"write",125,"Delete"],[161,"ext","codeunit",6500,"DeleteItemEntryRelation",7],[164,"ext","codeunit",361,"MoveDocRelatedEntries",2]]},{"name":"DeletePurchShptLines","line":167,"kind":"procedure","params":1,"steps":[[175,"event","OnBeforeDeletePurchShptLines",0],[177,"write",6651,"Delete"],[180,"ext","table",5805,"CheckAssignment",3],[183,"ext","codeunit",6500,"DeleteItemEntryRelation",7],[186,"ext","codeunit",361,"MoveDocRelatedEntries",2]]},{"name":"InitDeleteHeader","line":189,"kind":"procedure","params":8,"steps":[[193,"event","OnBeforeInitDeleteHeader",0],[225,"call","InitPurchInvHeader",3],[245,"call","InitPurchInvHeaderPrepmt",3],[261,"event","OnAfterInitDeleteHeader",0]]},{"name":"InitPurchInvHeader","line":265,"kind":"procedure","access":"local","params":3,"steps":[[283,"event","OnAfterInitPurchInvHeader",0]]},{"name":"InitPurchInvHeaderPrepmt","line":286,"kind":"procedure","access":"local","params":3,"steps":[[299,"event","OnAfterInitPurchInvHeaderPrepmt",0]]}]}