{"title":"Codeunit 5747 Purch. Whse. Post Shipment, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/5747-purch-whse-post-shipment/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":5747,"name":"Purch. Whse. Post Shipment","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/5747-purch-whse-post-shipment/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/5747-purch-whse-post-shipment/source/","path":"src/Layers/W1/BaseApp/Purchases/PurchWhsePostShipment.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:415":{"name":"Release Purchase Document","url":"https://jonas-paprotka.de/ref/codeunit/415-release-purchase-document/"},"table:38":{"name":"Purchase Header","url":"https://jonas-paprotka.de/ref/table/38-purchase-header/"},"table:39":{"name":"Purchase Line","url":"https://jonas-paprotka.de/ref/table/39-purchase-line/"},"codeunit:90":{"name":"Purch.-Post","url":"https://jonas-paprotka.de/ref/codeunit/90-purch-post/"},"table:265":{"name":"Document Entry","url":"https://jonas-paprotka.de/ref/table/265-document-entry/"},"table:124":{"name":"Purch. Cr. Memo Hdr.","url":"https://jonas-paprotka.de/ref/table/124-purch-cr-memo-hdr/"},"table:6650":{"name":"Return Shipment Header","url":"https://jonas-paprotka.de/ref/table/6650-return-shipment-header/"}},"procs":[{"name":"OnInitSourceDocumentHeader","line":34,"kind":"procedure","access":"local","params":3,"steps":[[48,"event","OnInitSourceDocumentHeaderOnBeforePurchaseHeaderUpdatePostingDate",1],[53,"event","OnInitSourceDocumentHeaderOnBeforeReopenPurchHeader",0],[54,"ext","codeunit",415,"SetSkipWhseRequestOperations",1],[55,"ext","codeunit",415,"Reopen",1],[56,"ext","codeunit",415,"SetSkipCheckReleaseRestrictions",0],[57,"ext","table",38,"SetHideValidationDialog",1],[58,"ext","table",38,"SetCalledFromWhseDoc",1],[59,"validate",38,"Posting Date"],[60,"run","codeunit",415],[79,"event","OnInitSourceDocumentHeaderOnBeforePurchHeaderModify",0],[81,"write",38,"Modify"]]},{"name":"OnAfterInitSourceDocumentLines","line":87,"kind":"procedure","access":"local","params":4,"steps":[[96,"call","HandlePurchaseLine",4]]},{"name":"HandlePurchaseLine","line":101,"kind":"procedure","access":"local","params":4,"steps":[[109,"event","OnBeforeHandlePurchaseLine",1],[119,"event","OnAfterFindWhseShptLineForPurchLine",0],[123,"validate",39,"Qty. to Receive"],[124,"event","OnHandlePurchaseLineOnAfterValidateQtytoReceive",0],[126,"validate",39,"Qty. to Invoice"],[134,"validate",39,"Return Qty. to Ship"],[135,"event","OnHandlePurchaseLineOnAfterValidateRetQtytoShip",0],[137,"validate",39,"Qty. to Invoice"],[147,"event","OnHandlePurchLineOnAfterCalcShouldModifyExpectedReceiptDate",0],[158,"call","UpdateAllNonInventoryLines",2],[159,"call","UpdateAttachedLine",3],[160,"call","ClearPurchLineQtyToShipReceive",3],[161,"event","OnBeforePurchLineModify",0],[163,"write",39,"Modify"],[166,"event","OnAfterHandlePurchaseLine",0]]},{"name":"ClearPurchLineQtyToShipReceive","line":169,"kind":"procedure","access":"local","params":3,"steps":[[175,"event","OnHandlePurchLineOnNonWhseLineOnAfterCalcModifyLine",0],[179,"validate",39,"Qty. to Receive"],[181,"validate",39,"Return Qty. to Ship"],[182,"validate",39,"Qty. to Invoice"]]},{"name":"UpdateAttachedLine","line":186,"kind":"procedure","access":"local","params":3,"steps":[[225,"validate",39,"Qty. to Receive"],[229,"validate",39,"Return Qty. to Ship"]]},{"name":"UpdateAllNonInventoryLines","line":235,"kind":"procedure","access":"local","params":2,"steps":[[239,"ext","table",39,"IsInventoriableItem",0],[249,"validate",39,"Qty. to Receive"],[253,"validate",39,"Return Qty. to Ship"]]},{"name":"OnPostSourceDocument","line":260,"kind":"procedure","access":"local","params":6,"steps":[[279,"ext","codeunit",90,"SetWhseShptHeader",1],[280,"ext","codeunit",90,"SetPreviewMode",1],[281,"ext","codeunit",90,"SetSuppressCommit",1],[282,"ext","codeunit",90,"SetCalledBy",1],[284,"event","OnPostSourceDocumentOnBeforePostPurchHeader",1],[287,"call","PostSourcePurchDocument",3],[292,"call","TryPostSourcePurchDocument",3],[294,"call","PostSourcePurchDocument",3],[301,"event","OnPostSourceDocumentOnBeforePrintPurchReturnShipment",1],[303,"call","InsertDocumentEntryToPrint",3],[307,"event","OnPostSourceDocumentOnBeforePrintPurchCreditMemo",1],[309,"call","InsertDocumentEntryToPrint",3],[314,"event","OnAfterPurchPost",0]]},{"name":"InsertDocumentEntryToPrint","line":320,"kind":"procedure","access":"local","params":3,"steps":[[326,"write",265,"Insert"]]},{"name":"TryPostSourcePurchDocument","line":329,"kind":"procedure","access":"local","params":3,"steps":[[335,"event","OnBeforeTryPostSourcePurchDocument",1],[337,"run","codeunit",90],[342,"event","OnAfterTryPostSourcePurchDocument",0]]},{"name":"PostSourcePurchDocument","line":345,"kind":"procedure","access":"local","params":3,"steps":[[347,"event","OnBeforePostSourcePurchDocument",0],[349,"ext","codeunit",90,"RunWithCheck",1],[352,"event","OnAfterPostSourcePurchDocument",0]]},{"name":"OnPrintDocuments","line":356,"kind":"procedure","access":"local","params":1,"steps":[[358,"call","PrintDocuments",1]]},{"name":"PrintDocuments","line":361,"kind":"procedure","access":"local","params":1,"steps":[[375,"ext","table",124,"PrintRecords",1],[387,"ext","table",6650,"PrintRecords",1]]}]}