{"title":"Codeunit 5992 Purchases Warehouse Mgt., extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/5992-purchases-warehouse-mgt/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":5992,"name":"Purchases Warehouse Mgt.","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/5992-purchases-warehouse-mgt/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/5992-purchases-warehouse-mgt/source/","path":"src/Layers/W1/BaseApp/Purchases/Document/PurchasesWarehouseMgt.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":{"page:518":{"name":"Purchase Lines","url":"https://jonas-paprotka.de/ref/page/518-purchase-lines/"},"page:50":{"name":"Purchase Order","url":"https://jonas-paprotka.de/ref/page/50-purchase-order/"},"page:6640":{"name":"Purchase Return Order","url":"https://jonas-paprotka.de/ref/page/6640-purchase-return-order/"},"page:136":{"name":"Posted Purchase Receipt","url":"https://jonas-paprotka.de/ref/page/136-posted-purchase-receipt/"},"page:6650":{"name":"Posted Return Shipment","url":"https://jonas-paprotka.de/ref/page/6650-posted-return-shipment/"},"codeunit:5777":{"name":"Whse. Validate Source Line","url":"https://jonas-paprotka.de/ref/codeunit/5777-whse-validate-source-line/"},"codeunit:8510":{"name":"Over-Receipt Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/8510-over-receipt-mgt/"},"table:7321":{"name":"Warehouse Shipment Line","url":"https://jonas-paprotka.de/ref/table/7321-warehouse-shipment-line/"},"codeunit:5750":{"name":"Whse.-Create Source Document","url":"https://jonas-paprotka.de/ref/codeunit/5750-whse-create-source-document/"},"table:7317":{"name":"Warehouse Receipt Line","url":"https://jonas-paprotka.de/ref/table/7317-warehouse-receipt-line/"},"table:39":{"name":"Purchase Line","url":"https://jonas-paprotka.de/ref/table/39-purchase-line/"},"codeunit:5775":{"name":"Whse. Management","url":"https://jonas-paprotka.de/ref/codeunit/5775-whse-management/"}},"procs":[{"name":"OnShowSourceDocLine","line":23,"kind":"procedure","access":"local","params":5,"steps":[[34,"event","OnBeforeShowPurchaseLines",1],[36,"call","ShowPurchaseLines",1]]},{"name":"OnShowSourceDocAttachedLines","line":41,"kind":"procedure","access":"local","params":4,"steps":[[52,"event","OnBeforeShowAttachedPurchaseLines",1],[54,"call","ShowPurchaseLines",1]]},{"name":"ShowPurchaseLines","line":58,"kind":"procedure","access":"local","params":1,"steps":[[60,"run","page",518]]},{"name":"OnShowSourceDocCard","line":64,"kind":"procedure","access":"local","params":3,"steps":[[73,"run","page",50],[75,"run","page",6640]]},{"name":"OnShowPostedSourceDoc","line":80,"kind":"procedure","access":"local","params":2,"steps":[[92,"run","page",136],[98,"run","page",6650]]},{"name":"PurchaseLineVerifyChange","line":113,"kind":"procedure","params":2,"steps":[[122,"event","OnBeforePurchaseLineVerifyChange",1],[126,"ext","codeunit",5777,"WhseLinesExist",6],[134,"ext","codeunit",5777,"VerifyFieldNotChanged",3],[135,"ext","codeunit",5777,"VerifyFieldNotChanged",3],[136,"ext","codeunit",5777,"VerifyFieldNotChanged",3],[137,"ext","codeunit",5777,"VerifyFieldNotChanged",3],[138,"ext","codeunit",5777,"VerifyFieldNotChanged",3],[139,"ext","codeunit",5777,"VerifyFieldNotChanged",3],[140,"ext","codeunit",5777,"VerifyFieldNotChanged",3],[141,"ext","codeunit",5777,"VerifyFieldNotChanged",3],[142,"ext","codeunit",5777,"VerifyFieldNotChanged",3],[143,"ext","codeunit",5777,"VerifyFieldNotChanged",3],[144,"ext","codeunit",5777,"VerifyFieldNotChanged",3],[145,"ext","codeunit",5777,"VerifyFieldNotChanged",3],[146,"ext","codeunit",5777,"VerifyFieldNotChanged",3],[148,"ext","codeunit",8510,"IsQuantityUpdatedFromInvtPutAwayOverReceipt",1],[150,"call","CheckQuantityReducedToZero",2],[152,"ext","codeunit",8510,"IsQuantityUpdatedFromWarehouseOverReceipt",1],[153,"ext","codeunit",5777,"VerifyFieldNotChanged",3],[154,"ext","codeunit",5777,"VerifyFieldNotChanged",3],[157,"event","OnAfterPurchaseLineVerifyChange",0]]},{"name":"PurchaseLineDelete","line":160,"kind":"procedure","params":1,"steps":[[162,"ext","codeunit",5777,"WhseLinesExist",6],[165,"ext","codeunit",5777,"RaiseCannotBeDeletedErr",1],[167,"event","OnAfterPurchaseLineDelete",0]]},{"name":"OnShowSourceDocumentCard","line":202,"kind":"procedure","access":"local","params":1,"steps":[[210,"run","page",50],[215,"run","page",6640]]},{"name":"OnSetFiltersOnSourceTables","line":221,"kind":"procedure","access":"local","params":3,"steps":[[235,"event","OnSetFiltersOnSourceTablesOnBeforeSetPurchaseTableView",0]]},{"name":"FromPurchLine2ShptLine","line":240,"kind":"procedure","params":2,"steps":[[246,"event","OnBeforeFromPurchLine2ShptLine",1],[250,"ext","table",7321,"InitNewLine",1],[251,"ext","table",7321,"SetSource",4],[253,"ext","table",7321,"SetItemData",9],[257,"event","OnFromPurchLine2ShptLineOnAfterInitNewLine",0],[258,"ext","codeunit",5750,"SetQtysOnShptLine",3],[273,"ext","codeunit",5750,"UpdateShipmentLine",2],[274,"event","OnFromPurchLine2ShptLineOnBeforeCreateShptLine",0],[275,"ext","codeunit",5750,"CreateShipmentLine",1],[276,"event","OnAfterCreateShptLineFromPurchLine",0],[277,"ext","table",7321,"HasErrorOccured",0]]},{"name":"PurchLine2ReceiptLine","line":280,"kind":"procedure","params":2,"steps":[[289,"event","OnBeforePurchLine2ReceiptLine",1],[293,"ext","table",7317,"InitNewLine",1],[294,"ext","table",7317,"SetSource",4],[296,"call","GetQuantityRelatedParameter",3],[297,"ext","table",7317,"SetItemData",9],[303,"event","OnPurchLine2ReceiptLineOnAfterInitNewLine",1],[308,"validate",7317,"Qty. Received"],[313,"validate",7317,"Qty. Received"],[317,"ext","codeunit",5750,"SetQtysOnRcptLine",3],[319,"event","OnPurchLine2ReceiptLineOnAfterSetQtysOnRcptLine",0],[325,"ext","codeunit",5750,"UpdateReceiptLine",2],[326,"event","OnPurchLine2ReceiptLineOnAfterUpdateReceiptLine",0],[327,"ext","codeunit",5750,"CreateReceiptLine",1],[328,"event","OnAfterCreateRcptLineFromPurchLine",0],[329,"ext","table",7317,"HasErrorOccured",0]]},{"name":"CheckIfFromPurchLine2ShptLine","line":337,"kind":"procedure","params":2,"steps":[[345,"event","OnBeforeCheckIfPurchLine2ShptLine",1],[349,"ext","table",39,"IsNonInventoriableItem",0],[352,"ext","table",39,"CheckIfPurchaseLineMeetsReservedFromStockSetting",2],[355,"ext","table",7321,"SetSourceFilter",5]]},{"name":"CheckIfPurchLine2ReceiptLine","line":360,"kind":"procedure","params":1,"steps":[[367,"event","OnBeforeCheckIfPurchLine2ReceiptLine",1],[371,"ext","table",39,"IsNonInventoriableItem",0]]},{"name":"GetQuantityRelatedParameter","line":383,"kind":"procedure","access":"local","params":3,"steps":[[388,"event","OnAfterGetQuantityRelatedParameter",0]]},{"name":"CreatePickOnCheckSourceDocument","line":505,"kind":"procedure","access":"local","params":1,"steps":[[514,"ext","codeunit",5775,"GetSourceDocumentDoesNotExistErr",0]]}]}