{"title":"Codeunit 23 Item Jnl.-Post Batch, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/23-item-jnl-post-batch/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":23,"name":"Item Jnl.-Post Batch","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/23-item-jnl-post-batch/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/23-item-jnl-post-batch/source/","path":"src/Layers/W1/BaseApp/Inventory/Posting/ItemJnlPostBatch.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:313":{"name":"Inventory Setup","url":"https://jonas-paprotka.de/ref/table/313-inventory-setup/"},"table:46":{"name":"Item Register","url":"https://jonas-paprotka.de/ref/table/46-item-register/"},"codeunit:22":{"name":"Item Jnl.-Post Line","url":"https://jonas-paprotka.de/ref/codeunit/22-item-jnl-post-line/"},"codeunit:308":{"name":"No. Series - Batch","url":"https://jonas-paprotka.de/ref/codeunit/308-no-series-batch/"},"codeunit:7380":{"name":"Phys. Invt. Count.-Management","url":"https://jonas-paprotka.de/ref/codeunit/7380-phys-invt-count-management/"},"codeunit:410":{"name":"Update Analysis View","url":"https://jonas-paprotka.de/ref/codeunit/410-update-analysis-view/"},"codeunit:7150":{"name":"Update Item Analysis View","url":"https://jonas-paprotka.de/ref/codeunit/7150-update-item-analysis-view/"},"codeunit:21":{"name":"Item Jnl.-Check Line","url":"https://jonas-paprotka.de/ref/codeunit/21-item-jnl-check-line/"},"codeunit:9500":{"name":"Sequence No. Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/9500-sequence-no-mgt/"},"table:83":{"name":"Item Journal Line","url":"https://jonas-paprotka.de/ref/table/83-item-journal-line/"},"codeunit:447":{"name":"Record Link Management","url":"https://jonas-paprotka.de/ref/codeunit/447-record-link-management/"},"table:233":{"name":"Item Journal Batch","url":"https://jonas-paprotka.de/ref/table/233-item-journal-batch/"},"table:50":{"name":"Accounting Period","url":"https://jonas-paprotka.de/ref/table/50-accounting-period/"},"table:32":{"name":"Item Ledger Entry","url":"https://jonas-paprotka.de/ref/table/32-item-ledger-entry/"},"table:27":{"name":"Item","url":"https://jonas-paprotka.de/ref/table/27-item/"},"table:5700":{"name":"Stockkeeping Unit","url":"https://jonas-paprotka.de/ref/table/5700-stockkeeping-unit/"},"codeunit:7302":{"name":"WMS Management","url":"https://jonas-paprotka.de/ref/codeunit/7302-wms-management/"},"codeunit:6500":{"name":"Item Tracking Management","url":"https://jonas-paprotka.de/ref/codeunit/6500-item-tracking-management/"},"codeunit:7301":{"name":"Whse. Jnl.-Register Line","url":"https://jonas-paprotka.de/ref/codeunit/7301-whse-jnl-register-line/"},"codeunit:27":{"name":"Confirm Management","url":"https://jonas-paprotka.de/ref/codeunit/27-confirm-management/"},"codeunit:5894":{"name":"Inventory Adjustment Handler","url":"https://jonas-paprotka.de/ref/codeunit/5894-inventory-adjustment-handler/"}},"procs":[{"name":"OnRun","line":32,"kind":"trigger","steps":[[34,"event","OnBeforeOnRun",0],[38,"call","Code",0],[41,"event","OnAfterOnRun",0]]},{"name":"Code","line":91,"kind":"procedure","access":"local","params":0,"steps":[[99,"event","OnBeforeCode",0],[108,"event","OnBeforeRaiseExceedLengthError",0],[122,"call","OpenProgressDialog",0],[124,"call","CheckItemAvailability",1],[126,"call","CheckLines",1],[130,"ext","table",313,"UseLegacyPosting",0],[136,"ext","table",46,"GetLastEntryNo",0],[144,"event","OnCodeOnBeforePostLines",0],[147,"call","PostLines",2],[149,"ext","table",313,"UseLegacyPosting",0],[155,"event","OnAfterCopyRegNos",0],[163,"ext","codeunit",22,"PostDeferredValueEntriesToGL",1],[165,"call","MakeInventoryAdjustment",0],[168,"event","OnBeforeUpdateDeleteLines",0],[171,"call","HandleRecurringLine",1],[173,"call","HandleNonRecurringLine",2],[174,"ext","codeunit",308,"SaveState",0],[178,"ext","codeunit",7380,"UpdateItemSKUListPhysInvtCount",0],[180,"event","OnAfterPostJnlLines",0],[191,"ext","codeunit",410,"UpdateAll",2],[192,"ext","codeunit",7150,"UpdateAll",2],[194,"event","OnAfterUpdateAnalysisViews",0],[196,"call","MoveItemJournalBatch",1],[201,"event","OnAfterCode",0]]},{"name":"OpenProgressDialog","line":204,"kind":"procedure","access":"local","params":0,"steps":[[209,"event","OnBeforeOpenProgressDialog",1]]},{"name":"CheckLines","line":232,"kind":"procedure","access":"local","params":1,"steps":[[238,"event","OnBeforeCheckLines",0],[246,"call","CheckRecurringLine",1],[249,"event","OnBeforeCheckJnlLine",1],[254,"ext","codeunit",21,"RunCheck",1],[259,"call","CheckWMSBin",1],[264,"call","CheckRemainingQty",2],[266,"event","OnAfterCheckJnlLine",0],[274,"ext","table",313,"UseLegacyPosting",0],[275,"ext","codeunit",9500,"AllocateSeqNoBuffer",2],[276,"ext","codeunit",9500,"AllocateSeqNoBuffer",2],[279,"event","OnAfterCheckLines",0]]},{"name":"PostLines","line":282,"kind":"procedure","access":"local","params":2,"steps":[[290,"event","OnBeforePostLines",0],[297,"ext","table",313,"UseLegacyPosting",0],[305,"event","OnBeforeValidateDocumentNo",1],[307,"ext","table",83,"EmptyLine",0],[308,"ext","codeunit",308,"GetNextNo",2],[309,"ext","table",83,"EmptyLine",0],[315,"call","MakeRecurringTexts",1],[316,"call","ConstructPostingNumber",1],[319,"event","OnBeforeOnPostLinesOnBeforePostLineUpdateItemTracking",1],[321,"call","UpdateItemTracking",1],[323,"event","OnPostLinesOnBeforePostLine",0],[326,"call","ItemJnlPostSumLine",1],[338,"event","OnBeforePostJnlLine",1],[342,"ext","codeunit",22,"RunWithCheck",1],[343,"ext","codeunit",22,"CheckItemTracking",1],[345,"event","OnHandleWhsePutAwayForProdOutput",0],[348,"ext","codeunit",22,"CollectTrackingSpecification",1],[349,"event","OnPostLinesBeforePostWhseJnlLine",0],[350,"call","PostWhseJnlLine",4],[351,"event","OnPostLinesOnAfterPostWhseJnlLine",0],[356,"event","OnPostLinesOnAfterPostLine",0],[358,"call","IsPhysInvtCount",3],[360,"ext","codeunit",7380,"InitTempItemSKUList",0],[363,"ext","codeunit",7380,"AddToTempItemSKUList",4],[368,"event","OnAfterPostLines",0]]},{"name":"HandleRecurringLine","line":371,"kind":"procedure","access":"local","params":1,"steps":[[377,"event","OnBeforeHandleRecurringLine",1],[385,"event","OnHandleRecurringLineOnBeforeItemJnlLine2Loop",0],[392,"validate",83,"Posting Date"],[400,"event","OnHandleRecurringLineOnBeforeItemJnlLineModify",0],[401,"write",83,"Modify"]]},{"name":"HandleNonRecurringLine","line":405,"kind":"procedure","access":"local","params":2,"steps":[[414,"event","OnBeforeHandleNonRecurringLine",1],[425,"event","OnHandleNonRecurringLineOnAfterCopyItemJnlLine3",0],[426,"ext","codeunit",447,"RemoveLinks",1],[427,"write",83,"DeleteAll"],[434,"event","OnBeforeIncrBatchName",0],[436,"write",233,"Delete"],[438,"event","OnHandleNonRecurringLineOnBeforeSetItemJnlBatchName",1],[441,"write",233,"Insert"],[446,"event","OnHandleNonRecurringLineOnInsertNewLine",0],[456,"write",83,"Insert"],[457,"ext","table",83,"SetUpNewLine",1],[458,"write",83,"Modify"],[459,"event","OnHandleNonRecurringLineOnAfterItemJnlLineModify",0]]},{"name":"ConstructPostingNumber","line":463,"kind":"procedure","access":"local","params":1,"steps":[[468,"event","OnBeforeConstructPostingNumber",1],[475,"ext","table",83,"EmptyLine",0],[480,"ext","codeunit",308,"GetNextNo",2],[484,"event","OnAfterConstructPostingNumber",0]]},{"name":"MakeRecurringTexts","line":504,"kind":"procedure","access":"local","params":1,"steps":[[507,"ext","table",50,"MakeRecurringTexts",3]]},{"name":"ItemJnlPostSumLine","line":510,"kind":"procedure","access":"local","params":1,"steps":[[525,"event","OnBeforeItemJournalPostSumLine",1],[539,"event","OnItemJnlPostSumLineOnAfterGetItem",0],[565,"event","OnItemJnlPostSumLineOnBeforeIncludeEntry",0],[566,"call","IncludeEntryInCalc",3],[588,"ext","table",32,"CalculateRemInventoryValue",5],[598,"call","IncludeEntryInCalc",3],[599,"ext","table",32,"CalculateRemQuantity",2],[601,"event","OnItemJnlPostSumLineOnAfterCalcThrowPostingsExistError",0],[612,"call","IncludeEntryInCalc",3],[621,"event","OnItemJnlPostSumLineOnBeforeCalcAppliedAmount",0],[630,"event","OnBeforeItemJnlPostSumLine",0],[631,"ext","codeunit",22,"RunWithCheck",1],[636,"call","IncludeEntryInCalc",3],[645,"call","UpdateStdCost",0],[648,"event","OnAfterItemJnlPostSumLine",0]]},{"name":"IncludeEntryInCalc","line":651,"kind":"procedure","access":"local","params":3,"steps":[[660,"event","OnAfterIncludeEntryInCalc",0]]},{"name":"UpdateStdCost","line":665,"kind":"procedure","access":"local","params":0,"steps":[[672,"call","UpdateItemStdCost",0],[675,"call","UpdateSKUStdCost",1],[677,"call","UpdateItemStdCost",0]]},{"name":"UpdateItemStdCost","line":680,"kind":"procedure","access":"local","params":0,"steps":[[685,"validate",27,"Standard Cost"],[686,"call","SetItemSingleLevelCosts",2],[687,"call","SetItemRolledUpCosts",2],[689,"write",27,"Modify"]]},{"name":"UpdateSKUStdCost","line":692,"kind":"procedure","access":"local","params":1,"steps":[[694,"validate",5700,"Standard Cost"],[695,"call","SetSKUSingleLevelCosts",2],[696,"call","SetSKURolledUpCosts",2],[697,"event","OnAfterUpdateStdCostSKUValidate",0],[698,"write",5700,"Modify"]]},{"name":"CheckRemainingQty","line":701,"kind":"procedure","access":"local","params":2,"steps":[[707,"event","OnBeforeCheckRemainingQty",1],[710,"ext","table",32,"CalculateRemQuantity",2]]},{"name":"PostWhseJnlLine","line":716,"kind":"procedure","params":4,"steps":[[724,"ext","table",27,"IsNonInventoriableType",0],[729,"call","GetLocation",1],[732,"event","OnPostWhseJnlLineOnBeforeCreateWhseJnlLines",1],[736,"call","PostWhseJnlLines",4],[739,"call","GetLocation",1],[740,"call","PostWhseJnlLines",4]]},{"name":"PostWhseJnlLines","line":744,"kind":"procedure","access":"local","params":4,"steps":[[752,"event","OnBeforePostWhseJnlLines",1],[757,"ext","codeunit",7302,"CreateWhseJnlLine",4],[758,"ext","codeunit",6500,"SplitWhseJnlLine",4],[761,"ext","codeunit",7302,"CheckWhseJnlLine",4],[763,"event","OnBeforeWhseJnlPostLineRun",1],[765,"run","codeunit",7301],[767,"event","OnAfterPostWhseJnlLine",0]]},{"name":"CheckWMSBin","line":771,"kind":"procedure","access":"local","params":1,"steps":[[777,"event","OnBeforeCheckWMSBin",1],[782,"ext","table",27,"IsNonInventoriableType",0],[785,"call","GetLocation",1],[792,"ext","codeunit",7302,"CheckAdjmtBin",3],[800,"ext","codeunit",7302,"CheckAdjmtBin",3],[801,"call","GetLocation",1],[803,"ext","codeunit",7302,"CheckAdjmtBin",3]]},{"name":"GetLocation","line":810,"kind":"procedure","access":"local","params":1,"steps":[[818,"event","OnAfterGetLocation",0]]},{"name":"CheckItemAvailability","line":839,"kind":"procedure","access":"local","params":1,"steps":[[850,"event","OnBeforeCheckItemAvailabilityHandled",1],[857,"ext","table",83,"IsNotInternalWhseMovement",0],[859,"call","InsertTempSKU",2],[860,"event","OnBeforeCheckItemAvailability",0],[865,"call","CalcRequiredQty",2],[872,"event","OnCheckItemAvailabilityOnAfterSetAvailableQty",0],[875,"ext","codeunit",27,"GetResponseOrDefault",2]]},{"name":"InsertTempSKU","line":885,"kind":"procedure","access":"local","params":2,"steps":[[891,"event","OnBeforeInsertTempSKU",0],[892,"write",5700,"Insert"]]},{"name":"UpdateItemTracking","line":966,"kind":"procedure","access":"local","params":1,"steps":[[971,"event","OnBeforeUpdateItemTracking",1],[976,"ext","table",83,"CreateItemTrackingLines",1],[977,"ext","table",83,"ClearTracking",0],[978,"ext","table",83,"ClearDates",0]]},{"name":"MakeInventoryAdjustment","line":981,"kind":"procedure","access":"local","params":0,"steps":[[983,"ext","codeunit",5894,"MakeAutomaticInventoryAdjustment",1]]},{"name":"MoveItemJournalBatch","line":986,"kind":"procedure","access":"local","params":1,"steps":[[991,"ext","table",233,"OnMoveItemJournalBatch",1]]},{"name":"OnBeforePostValueEntryToGL","line":995,"kind":"procedure","access":"local","params":3,"steps":[[999,"ext","table",313,"UseLegacyPosting",0]]},{"name":"OnSetItemAdjmtPropertiesOnBeforeCheckModifyItem","line":1041,"kind":"procedure","access":"local","params":1,"steps":[[1043,"ext","table",313,"UseLegacyPosting",0]]},{"name":"RunOnBeforeSelfReservedQty","line":1261,"kind":"procedure","access":"internal","params":4,"steps":[[1263,"event","OnBeforeSelfReservedQty",1]]}]}