{"title":"Codeunit 20541 Subc. Transfer WIP Posting, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/20541-subc-transfer-wip-posting/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":20541,"name":"Subc. Transfer WIP Posting","app":"Subcontracting","url":"https://jonas-paprotka.de/ref/codeunit/20541-subc-transfer-wip-posting/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/20541-subc-transfer-wip-posting/source/","path":"src/Apps/W1/Subcontracting/App/src/WIPItem/SubcTransferWIPPosting.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:20569":{"name":"Subc. Feature Flag Handler","url":"https://jonas-paprotka.de/ref/codeunit/20569-subc-feature-flag-handler/"},"table:5741":{"name":"Transfer Line","url":"https://jonas-paprotka.de/ref/table/5741-transfer-line/"},"table:5742":{"name":"Transfer Route","url":"https://jonas-paprotka.de/ref/table/5742-transfer-route/"},"table:14":{"name":"Location","url":"https://jonas-paprotka.de/ref/table/14-location/"},"table:7317":{"name":"Warehouse Receipt Line","url":"https://jonas-paprotka.de/ref/table/7317-warehouse-receipt-line/"},"table:20560":{"name":"Subcontractor WIP Ledger Entry","url":"https://jonas-paprotka.de/ref/table/20560-subcontractor-wip-ledger-entry/"},"codeunit:9500":{"name":"Sequence No. Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/9500-sequence-no-mgt/"}},"procs":[{"name":"OnUpdateTransLinesOnAfterUpdateFromDirectTransfer","line":34,"kind":"procedure","access":"local","params":2,"steps":[[38,"ext","codeunit",20569,"IsSubcontractingEnabled",0],[44,"validate",5741,"Transfer WIP Item"],[45,"ext","table",5741,"UpdateDescriptions",0]]},{"name":"UpdateTransferRoutesOnBeforeUpdateTransLines","line":50,"kind":"procedure","access":"local","params":3,"steps":[[56,"ext","codeunit",20569,"IsSubcontractingEnabled",0],[61,"ext","table",5742,"GetTransferRoute",5]]},{"name":"HandleWipTransferOnBeforeValidateQuantityShipIsBalanced","line":68,"kind":"procedure","access":"local","params":3,"steps":[[72,"ext","codeunit",20569,"IsSubcontractingEnabled",0]]},{"name":"HandleWipTransferOnBeforeValidateQuantityReceiveIsBalanced","line":81,"kind":"procedure","access":"local","params":3,"steps":[[85,"ext","codeunit",20569,"IsSubcontractingEnabled",0]]},{"name":"HandleWipTransferOnBeforeCheckItemInInventory","line":94,"kind":"procedure","access":"local","params":2,"steps":[[98,"ext","codeunit",20569,"IsSubcontractingEnabled",0]]},{"name":"HandleWipTransferOnBeforePostItemJnlLine","line":107,"kind":"procedure","access":"local","params":3,"steps":[[111,"ext","codeunit",20569,"IsSubcontractingEnabled",0]]},{"name":"HandleWipTransferOnBeforeCheckEmptyQuantity","line":120,"kind":"procedure","access":"local","params":2,"steps":[[126,"ext","codeunit",20569,"IsSubcontractingEnabled",0]]},{"name":"HandleWipTransferOnPostItemJnlLineBeforeItemJnlPostLineRunWithCheck","line":142,"kind":"procedure","access":"local","params":6,"steps":[[146,"ext","codeunit",20569,"IsSubcontractingEnabled",0]]},{"name":"HandleWipTransferShipmentLineOnAfterCopyFromTransferLine","line":158,"kind":"procedure","access":"local","params":2,"steps":[[162,"ext","codeunit",20569,"IsSubcontractingEnabled",0],[167,"call","CreateWIPLedgerEntryForShipment",2]]},{"name":"HandleWipTransferReceiptLineOnAfterCopyFromTransferLine","line":171,"kind":"procedure","access":"local","params":2,"steps":[[175,"ext","codeunit",20569,"IsSubcontractingEnabled",0],[180,"call","CreateWIPLedgerEntryForReceive",2]]},{"name":"HandleWipDirectTransLineOnAfterCopyFromTransferLine","line":184,"kind":"procedure","access":"local","params":2,"steps":[[188,"ext","codeunit",20569,"IsSubcontractingEnabled",0],[193,"call","CreateWIPLedgerEntryForDirectTransfer",2]]},{"name":"HandleWipTransferOnNoItemLedgerEntriesCheckIsNeeded","line":197,"kind":"procedure","access":"local","params":2,"steps":[[201,"ext","codeunit",20569,"IsSubcontractingEnabled",0]]},{"name":"HandleWipTransferOnBeforeShowReservation","line":210,"kind":"procedure","access":"local","params":2,"steps":[[214,"ext","codeunit",20569,"IsSubcontractingEnabled",0]]},{"name":"HandleWipTransferOnSetReservSource","line":222,"kind":"procedure","access":"local","params":7,"steps":[[228,"ext","codeunit",20569,"IsSubcontractingEnabled",0],[235,"ext","table",5741,"CheckForExistingReservationsOrItemTracking",0]]},{"name":"HandleWipTransferOnBeforeOpenItemTrackingLines","line":240,"kind":"procedure","access":"local","params":2,"steps":[[244,"ext","codeunit",20569,"IsSubcontractingEnabled",0]]},{"name":"HandleWipTransferOnBeforeCheckIfTransLine2ReceiptLine","line":252,"kind":"procedure","access":"local","params":3,"steps":[[258,"ext","codeunit",20569,"IsSubcontractingEnabled",0],[264,"ext","table",14,"GetLocationSetup",2]]},{"name":"HandleWipTransferOnTransLine2ReceiptLineOnAfterInitNewLine","line":276,"kind":"procedure","access":"local","params":4,"steps":[[280,"ext","codeunit",20569,"IsSubcontractingEnabled",0],[286,"validate",7317,"Qty. Received"],[290,"ext","table",7317,"InitOutstandingQtys",0]]},{"name":"CreateWIPLedgerEntryForShipment","line":295,"kind":"procedure","access":"local","params":2,"steps":[[300,"call","IsUsedAsSubcontractingLocation",1],[301,"call","CreateAndInsertWIPLedgerEntry",8],[307,"ext","table",5741,"CalcBaseQty",1],[312,"call","CreateAndInsertWIPLedgerEntry",8],[318,"ext","table",5741,"CalcBaseQty",1]]},{"name":"CreateWIPLedgerEntryForReceive","line":323,"kind":"procedure","access":"local","params":2,"steps":[[329,"call","CreateAndInsertWIPLedgerEntry",8],[335,"ext","table",5741,"CalcBaseQty",1],[339,"call","IsUsedAsSubcontractingLocation",1],[340,"call","CreateAndInsertWIPLedgerEntry",8],[346,"ext","table",5741,"CalcBaseQty",1]]},{"name":"CreateWIPLedgerEntryForDirectTransfer","line":351,"kind":"procedure","access":"local","params":2,"steps":[[356,"call","IsUsedAsSubcontractingLocation",1],[357,"call","CreateAndInsertWIPLedgerEntry",8],[363,"ext","table",5741,"CalcBaseQty",1],[367,"call","IsUsedAsSubcontractingLocation",1],[368,"call","CreateAndInsertWIPLedgerEntry",8],[374,"ext","table",5741,"CalcBaseQty",1]]},{"name":"CreateAndInsertWIPLedgerEntry","line":379,"kind":"procedure","access":"local","params":8,"steps":[[387,"call","InitWIPItemLedgerEntry",2],[391,"call","AssignFieldsFromTransferLine",3],[393,"call","AssignSourceDocument",4],[394,"call","InsertWIPItemLedgerEntry",1]]},{"name":"CreateAdjustmentWIPEntriesOnFinishProdOrder","line":397,"kind":"procedure","access":"internal","params":2,"steps":[[403,"ext","codeunit",20569,"IsSubcontractingEnabled",0],[407,"ext","table",20560,"SetProductionOrderFilter",2],[408,"call","SearchForAllWIPLedgerEntryCombinationAndCreateAdjustmentEntryToBalanceTheQuantities",2]]},{"name":"SearchForAllWIPLedgerEntryCombinationAndCreateAdjustmentEntryToBalanceTheQuantities","line":411,"kind":"procedure","access":"local","params":2,"steps":[[435,"call","CreateAdjustmentWIPEntry",3],[445,"call","CreateAdjustmentWIPEntry",3]]},{"name":"CreateAdjustmentWIPEntry","line":448,"kind":"procedure","access":"local","params":3,"steps":[[452,"call","InitWIPItemLedgerEntry",2],[474,"call","InsertWIPItemLedgerEntry",1]]},{"name":"ValidateSequenceNo","line":478,"kind":"procedure","access":"local","params":3,"steps":[[484,"ext","codeunit",9500,"ValidateSeqNo",1]]},{"name":"InsertWIPItemLedgerEntry","line":523,"kind":"procedure","access":"local","params":1,"steps":[[530,"ext","table",20560,"GetNextEntryNo",0],[534,"event","OnBeforeInsertWIPLedgerEntry",0],[535,"call","ValidateSequenceNo",3],[536,"write",20560,"Insert"]]}]}