{"title":"Codeunit 2677 Gen. Journal Alloc. Acc. Mgt., extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/2677-gen-journal-alloc-acc-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":2677,"name":"Gen. Journal Alloc. Acc. Mgt.","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/2677-gen-journal-alloc-acc-mgt/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/2677-gen-journal-alloc-acc-mgt/source/","path":"src/Layers/W1/BaseApp/Finance/AllocationAccount/GenJournalAllocAccMgt.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:2675":{"name":"Allocation Account Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/2675-allocation-account-mgt/"},"table:2672":{"name":"Allocation Line","url":"https://jonas-paprotka.de/ref/table/2672-allocation-line/"},"codeunit:2676":{"name":"Alloc. Acc. Telemetry","url":"https://jonas-paprotka.de/ref/codeunit/2676-alloc-acc-telemetry/"},"table:2673":{"name":"Alloc. Acc. Manual Override","url":"https://jonas-paprotka.de/ref/table/2673-alloc-acc-manual-override/"},"table:81":{"name":"Gen. Journal Line","url":"https://jonas-paprotka.de/ref/table/81-gen-journal-line/"},"codeunit:408":{"name":"DimensionManagement","url":"https://jonas-paprotka.de/ref/codeunit/408-dimensionmanagement/"}},"procs":[{"name":"GetOrGenerateAllocationLines","line":27,"kind":"procedure","access":"internal","params":4,"steps":[[40,"call","LoadManualAllocationLines",2],[42,"call","GetAllocationAccount",2],[43,"ext","codeunit",2675,"GenerateAllocationLines",6],[44,"call","ReplaceInheritFromParent",2]]},{"name":"LoadManualAllocationLines","line":48,"kind":"procedure","access":"internal","params":2,"steps":[[68,"event","OnLoadManualAllocationLinesOnBeforeInsertAllocationLine",0],[69,"write",2672,"Insert"]]},{"name":"ReplaceInheritFromParent","line":98,"kind":"procedure","access":"local","params":2,"steps":[[114,"write",2672,"ModifyAll"],[118,"write",2672,"ModifyAll"],[120,"write",2672,"ModifyAll"]]},{"name":"HandleBatchPost","line":137,"kind":"procedure","access":"local","params":3,"steps":[[142,"call","VerifyLinesFromBatch",2],[146,"ext","codeunit",2676,"LogGeneralJournalPostingUsage",0],[147,"call","CreateLinesFromBatch",1]]},{"name":"CheckBeforeModifyLine","line":173,"kind":"procedure","access":"local","params":3,"steps":[[175,"call","DeleteManualDistributionsIfLineChanged",1]]},{"name":"DeleteManualDistributionsIfLineChanged","line":178,"kind":"procedure","access":"local","params":1,"steps":[[187,"call","AllocationAccountUsed",1],[213,"write",2673,"DeleteAll"]]},{"name":"CreateLinesFromBatch","line":216,"kind":"procedure","access":"local","params":1,"steps":[[227,"call","CreateLines",1],[228,"write",81,"DeleteAll"],[232,"call","CreateLines",1],[233,"write",81,"DeleteAll"],[237,"call","CreateLines",1],[238,"write",81,"DeleteAll"]]},{"name":"CreateLines","line":245,"kind":"procedure","params":1,"steps":[[257,"call","CreateLinesFromAllocationAccountLine",1]]},{"name":"CreateLinesFromAllocationAccountLine","line":266,"kind":"procedure","access":"local","params":1,"steps":[[277,"call","VerifyAccountsMustMatchIfBothAccountTypeAndBalancingAccountTypeAreAllocationAccounts",1],[279,"call","GetAllocationAccount",2],[282,"call","GetOrGenerateAllocationLines",2],[290,"call","GetNextGenJournalLine",1],[293,"call","GetLineIncrement",3],[296,"call","GetLastGenJournalLine",1],[308,"call","GetDescriptionChanged",3],[310,"call","CreateGLLine",5],[317,"write",2673,"DeleteAll"]]},{"name":"VerifyLinesFromBatch","line":320,"kind":"procedure","access":"local","params":2,"steps":[[330,"call","VerifyGenJournalLines",1],[337,"call","VerifyGenJournalLines",1],[344,"call","VerifyGenJournalLines",1]]},{"name":"CreateGLLine","line":348,"kind":"procedure","access":"local","params":5,"steps":[[360,"call","UpdateAccountNumbersAndTypesOnGenJournalLine",3],[362,"validate",81,"Amount"],[363,"call","TransferDimensionSetID",3],[370,"validate",81,"Amount (LCY)"],[372,"event","OnBeforeCreateGeneralJournalLine",0],[373,"write",81,"Insert",1]]},{"name":"UpdateAccountNumbersAndTypesOnGenJournalLine","line":377,"kind":"procedure","access":"local","params":3,"steps":[[381,"call","TranslateAccountTypeToGenJournalLineAccountType",2]]},{"name":"TranslateAccountTypeToGenJournalLineAccountType","line":402,"kind":"procedure","access":"local","params":2,"steps":[[406,"event","OnBeforeGetGeneralJournalLineType",0]]},{"name":"TransferDimensionSetID","line":515,"kind":"procedure","access":"local","params":3,"steps":[[528,"ext","codeunit",408,"UpdateGlobalDimFromDimSetID",3],[537,"ext","codeunit",408,"GetCombinedDimensionSetID",3]]},{"name":"VerifyGeneralJournalLineOnAfterModify","line":542,"kind":"procedure","access":"local","params":3,"steps":[[544,"call","VerifyGeneralJournalLine",1]]},{"name":"VerifyGenJournalLines","line":578,"kind":"procedure","access":"local","params":1,"steps":[[585,"call","VerifyGeneralJournalLine",1]]},{"name":"VerifyGeneralJournalLine","line":589,"kind":"procedure","access":"local","params":1,"steps":[[593,"call","AllocationAccountUsed",1],[596,"event","OnBeforeVerifyGeneralJournalLine",0],[601,"ext","codeunit",2675,"VerifyNoInheritFromParentUsed",1],[604,"ext","codeunit",2675,"VerifyNoInheritFromParentUsed",1],[607,"call","VerifySelectedAllocationAccountNo",1]]},{"name":"VerifySelectedAllocationAccountNo","line":614,"kind":"procedure","params":1,"steps":[[622,"call","VerifyParentAccountIsDefined",1]]}]}