{"title":"Codeunit 570 G/L Account Category Mgt., extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/570-g-l-account-category-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":570,"name":"G/L Account Category Mgt.","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/570-g-l-account-category-mgt/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/570-g-l-account-category-mgt/source/","path":"src/Layers/W1/BaseApp/Finance/GeneralLedger/Account/GLAccountCategoryMgt.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:15":{"name":"G/L Account","url":"https://jonas-paprotka.de/ref/table/15-g-l-account/"},"table:570":{"name":"G/L Account Category","url":"https://jonas-paprotka.de/ref/table/570-g-l-account-category/"},"table:98":{"name":"General Ledger Setup","url":"https://jonas-paprotka.de/ref/table/98-general-ledger-setup/"},"table:88":{"name":"Financial Report","url":"https://jonas-paprotka.de/ref/table/88-financial-report/"},"table:84":{"name":"Acc. Schedule Name","url":"https://jonas-paprotka.de/ref/table/84-acc-schedule-name/"},"table:333":{"name":"Column Layout Name","url":"https://jonas-paprotka.de/ref/table/333-column-layout-name/"},"table:334":{"name":"Column Layout","url":"https://jonas-paprotka.de/ref/table/334-column-layout/"},"table:8391":{"name":"Financial Report Category","url":"https://jonas-paprotka.de/ref/table/8391-financial-report-category/"},"table:8395":{"name":"Financial Report Status","url":"https://jonas-paprotka.de/ref/table/8395-financial-report-status/"},"codeunit:571":{"name":"Categ. Generate Acc. Schedules","url":"https://jonas-paprotka.de/ref/codeunit/571-categ-generate-acc-schedules/"},"report:25":{"name":"Account Schedule","url":"https://jonas-paprotka.de/ref/report/25-account-schedule/"},"codeunit:18":{"name":"Financial Report Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/18-financial-report-mgt/"}},"procs":[{"name":"OnRun","line":23,"kind":"trigger","steps":[[25,"call","InitializeAccountCategories",0]]},{"name":"InitializeAccountCategories","line":154,"kind":"procedure","params":0,"steps":[[162,"event","OnBeforeInitializeAccountCategories",1],[171,"write",15,"ModifyAll"],[172,"write",570,"DeleteAll"],[173,"call","AddCategory",6],[174,"call","AddCategory",6],[176,"call","AddCategory",6],[178,"call","AddCategory",6],[182,"call","AddCategory",6],[186,"call","AddCategory",6],[189,"call","AddCategory",6],[191,"call","AddCategory",6],[195,"call","AddCategory",6],[198,"call","AddCategory",6],[200,"call","AddCategory",6],[204,"call","AddCategory",6],[208,"call","AddCategory",6],[211,"call","AddCategory",6],[212,"call","AddCategory",6],[214,"call","AddCategory",6],[218,"call","AddCategory",6],[221,"call","AddCategory",6],[222,"call","AddCategory",6],[223,"call","AddCategory",6],[224,"call","AddCategory",6],[225,"call","AddCategory",6],[226,"call","AddCategory",6],[227,"call","AddCategory",6],[228,"call","AddCategory",6],[229,"call","AddCategory",6],[230,"call","AddCategory",6],[231,"call","AddCategory",6],[232,"call","AddCategory",6],[233,"call","AddCategory",6],[234,"call","AddCategory",6],[235,"call","AddCategory",6],[236,"call","AddCategory",6],[237,"call","AddCategory",6],[238,"call","AddCategory",6],[239,"call","AddCategory",6],[240,"call","AddCategory",6],[241,"call","AddCategory",6],[242,"call","AddCategory",6],[243,"call","AddCategory",6],[244,"call","AddCategory",6],[245,"call","AddCategory",6],[246,"call","AddCategory",6],[247,"call","AddCategory",6],[248,"call","AddCategory",6],[249,"call","AddCategory",6],[251,"event","OnAfterInitializeAccountCategories",0]]},{"name":"AddCategory","line":265,"kind":"procedure","params":6,"steps":[[283,"validate",570,"Account Category"],[284,"validate",570,"Additional Report Definition"],[292,"write",570,"Insert",1],[293,"ext","table",570,"UpdatePresentationOrder",0]]},{"name":"ForceInitializeStandardAccountSchedules","line":301,"kind":"procedure","params":0,"steps":[[304,"call","InitializeStandardAccountSchedules",0]]},{"name":"InitializeStandardAccountSchedules","line":316,"kind":"procedure","params":0,"steps":[[339,"call","CreateUniqueColumnLayoutName",1],[340,"call","CreateUniqueColumnLayoutName",1],[342,"call","CreateUniqueAccSchedName",1],[343,"call","CreateUniqueAccSchedName",1],[344,"call","CreateUniqueAccSchedName",1],[345,"call","CreateUniqueAccSchedName",1],[350,"call","CreateUniqueFinancialReportName",1],[352,"call","CreateUniqueFinancialReportName",1],[358,"call","CreateUniqueFinancialReportName",1],[360,"call","CreateUniqueFinancialReportName",1],[366,"call","CreateUniqueFinancialReportName",1],[368,"call","CreateUniqueFinancialReportName",1],[374,"call","CreateUniqueFinancialReportName",1],[376,"call","CreateUniqueFinancialReportName",1],[383,"write",98,"Modify"],[385,"call","AddFinancialReportStatus",4],[386,"call","AddFinancialReportStatus",4],[387,"call","AddFinancialReportStatus",4],[389,"call","AddColumnLayout",4],[390,"call","AddColumnLayout",4],[392,"call","AddAccountSchedule",2],[393,"call","AddAccountSchedule",2],[394,"call","AddAccountSchedule",2],[395,"call","AddAccountSchedule",2],[397,"call","AddFinancialReportCategory",3],[398,"call","AddFinancialReportCategory",3],[399,"call","AddFinancialReportCategory",3],[400,"call","AddFinancialReportCategory",3],[401,"call","AddFinancialReportCategory",3],[402,"call","AddFinancialReportCategory",3],[403,"call","AddFinancialReportCategory",3],[404,"call","AddFinancialReportCategory",3],[405,"call","AddFinancialReportCategory",3],[406,"call","AddFinancialReportCategory",3],[407,"call","AddFinancialReportCategory",3],[408,"call","AddFinancialReportCategory",3],[409,"call","AddFinancialReportCategory",3],[411,"call","AddFinancialReport",7],[412,"call","AddFinancialReport",7],[413,"call","AddFinancialReport",7],[414,"call","AddFinancialReport",7]]},{"name":"AddFinancialReport","line":417,"kind":"procedure","access":"local","params":7,"steps":[[422,"call","UpdateFinancialReport",5],[433,"write",88,"Insert"]]},{"name":"UpdateFinancialReport","line":437,"kind":"procedure","access":"local","params":5,"steps":[[448,"write",88,"Modify"]]},{"name":"AddAccountSchedule","line":452,"kind":"procedure","access":"local","params":2,"steps":[[462,"write",84,"Insert"]]},{"name":"AddColumnLayout","line":465,"kind":"procedure","access":"local","params":4,"steps":[[476,"write",333,"Insert"],[486,"write",334,"Insert"]]},{"name":"AddFinancialReportCategory","line":489,"kind":"procedure","access":"local","params":3,"steps":[[499,"write",8391,"Insert"]]},{"name":"AddFinancialReportStatus","line":502,"kind":"procedure","access":"local","params":4,"steps":[[513,"write",8395,"Insert"]]},{"name":"GetGLSetup","line":526,"kind":"procedure","params":1,"steps":[[531,"call","AnyAccSchedSetupMissing",1],[532,"call","InitializeStandardAccountSchedules",0],[534,"call","AnyAccSchedSetupMissing",1],[539,"ext","codeunit",571,"CreateBalanceSheet",0],[544,"ext","codeunit",571,"CreateCashFlowStatement",0],[549,"ext","codeunit",571,"CreateIncomeStatement",0],[554,"ext","codeunit",571,"CreateRetainedEarningsStatement",0]]},{"name":"CreateUniqueFinancialReportName","line":561,"kind":"procedure","access":"local","params":1,"steps":[[568,"call","GenerateNextName",2]]},{"name":"CreateUniqueAccSchedName","line":572,"kind":"procedure","access":"local","params":1,"steps":[[579,"call","GenerateNextName",2]]},{"name":"CreateUniqueColumnLayoutName","line":583,"kind":"procedure","access":"local","params":1,"steps":[[590,"call","GenerateNextName",2]]},{"name":"RunAccountScheduleReport","line":608,"kind":"procedure","params":1,"steps":[[614,"event","OnBeforeOnRunAccountScheduleReport",1],[618,"ext","report",25,"InitAccSched",0],[619,"ext","report",25,"SetFinancialReportNameNonEditable",1]]},{"name":"ConfirmAndRunGenerateAccountSchedules","line":627,"kind":"procedure","params":0,"steps":[[631,"ext","codeunit",18,"Initialize",0],[632,"call","GLSetupAllAccScheduleNamesNotDefined",0],[633,"run","codeunit",571],[640,"call","ForceInitializeStandardAccountSchedules",0],[641,"run","codeunit",571],[644,"run","codeunit",571]]},{"name":"OnInitializeCompany","line":691,"kind":"procedure","access":"local","params":0,"steps":[[698,"event","OnBeforeInitializeCompany",0],[700,"call","InitializeAccountCategories",0],[701,"run","codeunit",571],[703,"event","OnAfterInitializeCompany",0]]},{"name":"CheckGLAccount","line":1178,"kind":"procedure","params":7,"steps":[[1184,"event","OnBeforeCheckGLAccount",1],[1192,"ext","table",15,"CheckGLAcc",0],[1198,"validate",15,"Account Category"],[1200,"validate",15,"Account Subcategory Entry No."],[1200,"call","GetSubcategoryEntryNo",2],[1201,"write",15,"Modify"]]},{"name":"CheckGLAccountWithoutCategory","line":1212,"kind":"procedure","params":3,"steps":[[1217,"call","CheckGLAccount",5]]},{"name":"LookupGLAccount","line":1241,"kind":"procedure","params":5,"steps":[[1250,"event","OnBeforeLookupGLAccount",1]]}]}