{"title":"Codeunit 7304 Whse. Jnl.-Register Batch, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/7304-whse-jnl-register-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":7304,"name":"Whse. Jnl.-Register Batch","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/7304-whse-jnl-register-batch/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/7304-whse-jnl-register-batch/source/","path":"src/Layers/W1/BaseApp/Warehouse/Journal/WhseJnlRegisterBatch.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:9500":{"name":"Sequence No. Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/9500-sequence-no-mgt/"},"table:7311":{"name":"Warehouse Journal Line","url":"https://jonas-paprotka.de/ref/table/7311-warehouse-journal-line/"},"codeunit:308":{"name":"No. Series - Batch","url":"https://jonas-paprotka.de/ref/codeunit/308-no-series-batch/"},"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:7380":{"name":"Phys. Invt. Count.-Management","url":"https://jonas-paprotka.de/ref/codeunit/7380-phys-invt-count-management/"},"codeunit:22":{"name":"Item Jnl.-Post Line","url":"https://jonas-paprotka.de/ref/codeunit/22-item-jnl-post-line/"},"table:6565":{"name":"Item Tracking Setup","url":"https://jonas-paprotka.de/ref/table/6565-item-tracking-setup/"},"table:7310":{"name":"Warehouse Journal Batch","url":"https://jonas-paprotka.de/ref/table/7310-warehouse-journal-batch/"},"table:6550":{"name":"Whse. Item Tracking Line","url":"https://jonas-paprotka.de/ref/table/6550-whse-item-tracking-line/"},"table:7302":{"name":"Bin Content","url":"https://jonas-paprotka.de/ref/table/7302-bin-content/"},"table:336":{"name":"Tracking Specification","url":"https://jonas-paprotka.de/ref/table/336-tracking-specification/"},"table:7330":{"name":"Bin Content Buffer","url":"https://jonas-paprotka.de/ref/table/7330-bin-content-buffer/"},"table:7354":{"name":"Bin","url":"https://jonas-paprotka.de/ref/table/7354-bin/"},"table:83":{"name":"Item Journal Line","url":"https://jonas-paprotka.de/ref/table/83-item-journal-line/"},"table:337":{"name":"Reservation Entry","url":"https://jonas-paprotka.de/ref/table/337-reservation-entry/"},"codeunit:99000830":{"name":"Create Reserv. Entry","url":"https://jonas-paprotka.de/ref/codeunit/99000830-create-reserv-entry/"},"codeunit:5402":{"name":"Unit of Measure Management","url":"https://jonas-paprotka.de/ref/codeunit/5402-unit-of-measure-management/"},"codeunit:27":{"name":"Confirm Management","url":"https://jonas-paprotka.de/ref/codeunit/27-confirm-management/"},"table:5700":{"name":"Stockkeeping Unit","url":"https://jonas-paprotka.de/ref/table/5700-stockkeeping-unit/"}},"procs":[{"name":"OnRun","line":28,"kind":"trigger","steps":[[31,"call","Code",0]]},{"name":"Code","line":71,"kind":"procedure","access":"local","params":0,"steps":[[83,"event","OnBeforeCode",1],[93,"event","OnCodeOnAfterWhseJnlBatchGet",0],[109,"call","CheckItemAvailability",1],[111,"call","CheckLines",2],[112,"ext","codeunit",9500,"AllocateSeqNoBuffer",2],[122,"event","OnBeforeRegisterLines",0],[127,"ext","table",7311,"EmptyLine",0],[131,"ext","codeunit",308,"GetNextNo",2],[132,"ext","table",7311,"EmptyLine",0],[137,"ext","table",7311,"EmptyLine",0],[142,"ext","codeunit",308,"GetNextNo",2],[153,"ext","codeunit",7302,"CalcCubageAndWeight",5],[156,"ext","codeunit",6500,"SplitWhseJnlLine",4],[159,"event","OnBeforeWhseJnlRegisterLineRun",0],[160,"run","codeunit",7301],[163,"call","PostItemJnlLine",0],[165,"call","IsPhysInvtCount",3],[167,"ext","codeunit",7380,"InitTempItemSKUList",0],[170,"ext","codeunit",7380,"AddToTempItemSKUList",4],[178,"call","UpdateDeleteLines",0],[180,"ext","codeunit",308,"SaveState",0],[183,"ext","codeunit",7380,"UpdateItemSKUListPhysInvtCount",0],[185,"event","OnAfterPostJnlLines",0],[193,"event","OnAfterCode",0]]},{"name":"PostItemJnlLine","line":196,"kind":"procedure","access":"local","params":0,"steps":[[202,"event","OnBeforePostItemJnlLine",1],[206,"ext","table",7311,"IsReclass",1],[207,"call","CreateItemJnlLine",2],[208,"ext","codeunit",22,"RunWithCheck",1],[210,"event","OnAfterItemJnlPostLine",0]]},{"name":"CheckLines","line":213,"kind":"procedure","access":"local","params":2,"steps":[[220,"ext","codeunit",6500,"InitCollectItemTrkgInformation",0],[226,"event","OnCheckLinesOnBeforeCheckWhseJnlLine",1],[228,"ext","codeunit",7302,"CheckWhseJnlLine",4],[230,"call","UpdateTempBinContentBuffer",3],[232,"call","UpdateTempBinContentBuffer",3],[234,"ext","codeunit",6500,"GetWhseItemTrkgSetup",2],[235,"event","OnCheckLinesOnAfterGetWhseItemTrkgSetup",0],[236,"ext","table",6565,"TrackingRequired",0],[240,"call","CreateTrackingSpecification",2],[242,"event","OnCheckWhseJnlLine",0],[243,"ext","table",7311,"CheckTrackingIfRequired",1],[246,"ext","codeunit",6500,"CollectItemTrkgInfWhseJnlLine",1],[247,"event","OnAfterCollectTrackingInformation",0],[251,"ext","codeunit",6500,"CheckItemTrkgInfBeforePost",0],[252,"call","CheckIncreaseBin",0]]},{"name":"UpdateDeleteLines","line":256,"kind":"procedure","access":"local","params":0,"steps":[[262,"event","OnBeforeUpdateDeleteLines",0],[272,"ext","codeunit",6500,"DeleteWhseItemTrkgLines",8],[276,"write",7311,"DeleteAll"],[285,"call","IncreaseBatchName",1],[294,"write",7311,"Insert"],[295,"ext","table",7311,"SetUpNewLine",1],[296,"write",7311,"Modify"]]},{"name":"IncreaseBatchName","line":300,"kind":"procedure","access":"local","params":1,"steps":[[305,"event","OnBeforeIncrBatchName",1],[310,"write",7310,"Delete"],[312,"write",7310,"Insert"]]},{"name":"CreateTrackingSpecification","line":317,"kind":"procedure","access":"local","params":2,"steps":[[326,"event","OnBeforeCreateTrackingSpecification",1],[352,"event","OnCreateTrackingSpecificationOnBeforeItemTrackingMgtGetWhseItemTrkgSetup",0],[353,"ext","codeunit",6500,"GetWhseItemTrkgSetup",2],[354,"event","OnCreateTrackingSpecificationOnAfterItemTrackingMgtGetWhseItemTrkgSetup",0],[355,"ext","table",6550,"CheckTrackingIfRequired",1],[363,"ext","table",7302,"SetTrackingFilterFromWhseItemTrackingLine",1],[372,"event","OnBeforeInsertTempHandlingSpecs",0],[377,"event","OnBeforeTempHandlingSpecificationInsert",0],[378,"write",336,"Insert"],[386,"ext","table",7302,"SetTrackingFilterFromTrackingSpecification",1],[387,"ext","table",7302,"CheckDecreaseBinContent",3]]},{"name":"UpdateTempBinContentBuffer","line":392,"kind":"procedure","access":"local","params":3,"steps":[[401,"write",7330,"Insert"],[408,"ext","codeunit",7302,"CalcCubageAndWeight",5],[414,"write",7330,"Modify"]]},{"name":"CheckIncreaseBin","line":417,"kind":"procedure","access":"local","params":0,"steps":[[423,"event","OnBeforeCheckBin",1],[431,"ext","table",7354,"CheckIncreaseBin",9]]},{"name":"CreateItemJnlLine","line":441,"kind":"procedure","access":"local","params":2,"steps":[[461,"validate",83,"Entry Type"],[463,"ext","table",6550,"HasSameNewTracking",0],[465,"event","OnCreateItemJnlLineOnAfterCalcShouldCreateReservEntry",0],[467,"ext","table",337,"CopyTrackingFromWhseItemTrackingLine",1],[468,"ext","codeunit",99000830,"CreateReservEntryFor",10],[471,"ext","codeunit",99000830,"SetNewTrackingFromNewWhseItemTrackingLine",1],[472,"ext","codeunit",99000830,"SetDates",2],[473,"ext","codeunit",99000830,"SetNewExpirationDate",1],[474,"event","OnBeforeCreateReservEntry",0],[475,"ext","codeunit",99000830,"CreateEntry",8],[482,"call","CopyFieldsFromWhseJnlLineToItemJnlLine",3],[483,"event","OnAfterCreateItemJnlLine",0],[487,"event","OnCreateItemJnlLineOnBeforeExit",0]]},{"name":"CopyFieldsFromWhseJnlLineToItemJnlLine","line":491,"kind":"procedure","params":3,"steps":[[493,"event","OnBeforeCopyFieldsFromWhseJnlLineToItemJnlLine",0],[495,"validate",83,"Posting Date"],[496,"validate",83,"Item No."],[497,"validate",83,"Variant Code"],[498,"validate",83,"Location Code"],[499,"validate",83,"Unit of Measure Code"],[500,"validate",83,"Quantity"],[500,"ext","codeunit",5402,"QtyRndPrecision",0]]},{"name":"CheckItemAvailability","line":518,"kind":"procedure","access":"local","params":1,"steps":[[531,"call","InsertTempSKU",2],[533,"call","CalcRequiredQty",2],[535,"call","CalcReservedQtyOnInventory",3],[536,"call","CalcQtyOnWarehouseEntry",3],[537,"event","OnCheckItemAvailabilityOnAfterCalcQtyOnWarehouseEntry",0],[539,"ext","codeunit",27,"GetResponseOrDefault",2],[549,"event","OnAfterCheckItemAvailability",0]]},{"name":"InsertTempSKU","line":574,"kind":"procedure","access":"local","params":2,"steps":[[580,"write",5700,"Insert"]]}]}