{"title":"Codeunit 2 Company-Initialize, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/2-company-initialize/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":2,"name":"Company-Initialize","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/2-company-initialize/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/2-company-initialize/source/","path":"src/Layers/W1/BaseApp/Foundation/Company/CompanyInitialize.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:1252":{"name":"Bank Pmt. Appl. Rule","url":"https://jonas-paprotka.de/ref/table/1252-bank-pmt-appl-rule/"},"codeunit:249":{"name":"VAT Registration Log Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/249-vat-registration-log-mgt/"},"codeunit:1502":{"name":"Workflow Setup","url":"https://jonas-paprotka.de/ref/codeunit/1502-workflow-setup/"},"table:1237":{"name":"Transformation Rule","url":"https://jonas-paprotka.de/ref/table/1237-transformation-rule/"},"codeunit:9999":{"name":"Upgrade Tag","url":"https://jonas-paprotka.de/ref/codeunit/9999-upgrade-tag/"},"codeunit:2":{"name":"Company-Initialize","url":"https://jonas-paprotka.de/ref/codeunit/2-company-initialize/"},"table:98":{"name":"General Ledger Setup","url":"https://jonas-paprotka.de/ref/table/98-general-ledger-setup/"},"table:311":{"name":"Sales & Receivables Setup","url":"https://jonas-paprotka.de/ref/table/311-sales-receivables-setup/"},"table:5079":{"name":"Marketing Setup","url":"https://jonas-paprotka.de/ref/table/5079-marketing-setup/"},"table:5122":{"name":"Interaction Template Setup","url":"https://jonas-paprotka.de/ref/table/5122-interaction-template-setup/"},"table:312":{"name":"Purchases & Payables Setup","url":"https://jonas-paprotka.de/ref/table/312-purchases-payables-setup/"},"table:313":{"name":"Inventory Setup","url":"https://jonas-paprotka.de/ref/table/313-inventory-setup/"},"table:314":{"name":"Resources Setup","url":"https://jonas-paprotka.de/ref/table/314-resources-setup/"},"table:315":{"name":"Jobs Setup","url":"https://jonas-paprotka.de/ref/table/315-jobs-setup/"},"table:5603":{"name":"FA Setup","url":"https://jonas-paprotka.de/ref/table/5603-fa-setup/"},"table:5218":{"name":"Human Resources Setup","url":"https://jonas-paprotka.de/ref/table/5218-human-resources-setup/"},"table:5769":{"name":"Warehouse Setup","url":"https://jonas-paprotka.de/ref/table/5769-warehouse-setup/"},"table:5719":{"name":"Nonstock Item Setup","url":"https://jonas-paprotka.de/ref/table/5719-nonstock-item-setup/"},"table:843":{"name":"Cash Flow Setup","url":"https://jonas-paprotka.de/ref/table/843-cash-flow-setup/"},"table:1108":{"name":"Cost Accounting Setup","url":"https://jonas-paprotka.de/ref/table/1108-cost-accounting-setup/"},"table:905":{"name":"Assembly Setup","url":"https://jonas-paprotka.de/ref/table/905-assembly-setup/"},"table:743":{"name":"VAT Report Setup","url":"https://jonas-paprotka.de/ref/table/743-vat-report-setup/"},"table:326":{"name":"Tax Setup","url":"https://jonas-paprotka.de/ref/table/326-tax-setup/"},"table:8627":{"name":"Config. Setup","url":"https://jonas-paprotka.de/ref/table/8627-config-setup/"},"table:1806":{"name":"Data Migration Setup","url":"https://jonas-paprotka.de/ref/table/1806-data-migration-setup/"},"table:131":{"name":"Incoming Documents Setup","url":"https://jonas-paprotka.de/ref/table/131-incoming-documents-setup/"},"table:1312":{"name":"Trial Balance Setup","url":"https://jonas-paprotka.de/ref/table/1312-trial-balance-setup/"},"table:79":{"name":"Company Information","url":"https://jonas-paprotka.de/ref/table/79-company-information/"},"table:443":{"name":"IC Setup","url":"https://jonas-paprotka.de/ref/table/443-ic-setup/"},"table:189":{"name":"VAT Setup","url":"https://jonas-paprotka.de/ref/table/189-vat-setup/"},"table:242":{"name":"Source Code Setup","url":"https://jonas-paprotka.de/ref/table/242-source-code-setup/"},"codeunit:1901":{"name":"Report Selection Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/1901-report-selection-mgt/"},"table:1275":{"name":"Doc. Exch. Service Setup","url":"https://jonas-paprotka.de/ref/table/1275-doc-exch-service-setup/"},"table:61":{"name":"Electronic Document Format","url":"https://jonas-paprotka.de/ref/table/61-electronic-document-format/"},"table:230":{"name":"Source Code","url":"https://jonas-paprotka.de/ref/table/230-source-code/"},"table:7":{"name":"Standard Text","url":"https://jonas-paprotka.de/ref/table/7-standard-text/"},"table:377":{"name":"Object Translation","url":"https://jonas-paprotka.de/ref/table/377-object-translation/"},"table:1006":{"name":"Job WIP Method","url":"https://jonas-paprotka.de/ref/table/1006-job-wip-method/"},"table:1200":{"name":"Bank Export/Import Setup","url":"https://jonas-paprotka.de/ref/table/1200-bank-export-import-setup/"},"codeunit:9179":{"name":"Application Area Mgmt. Facade","url":"https://jonas-paprotka.de/ref/codeunit/9179-application-area-mgmt-facade/"},"codeunit:457":{"name":"Environment Information","url":"https://jonas-paprotka.de/ref/codeunit/457-environment-information/"},"codeunit:1306":{"name":"Company Information Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/1306-company-information-mgt/"},"table:1802":{"name":"Assisted Company Setup Status","url":"https://jonas-paprotka.de/ref/table/1802-assisted-company-setup-status/"},"table:9178":{"name":"Application Area Setup","url":"https://jonas-paprotka.de/ref/table/9178-application-area-setup/"},"table:9650":{"name":"Custom Report Layout","url":"https://jonas-paprotka.de/ref/table/9650-custom-report-layout/"},"table:9651":{"name":"Report Layout Selection","url":"https://jonas-paprotka.de/ref/table/9651-report-layout-selection/"},"table:9176":{"name":"Experience Tier Setup","url":"https://jonas-paprotka.de/ref/table/9176-experience-tier-setup/"},"codeunit:4030":{"name":"Client Type Management","url":"https://jonas-paprotka.de/ref/codeunit/4030-client-type-management/"}},"procs":[{"name":"OnRun","line":97,"kind":"trigger","steps":[[108,"event","OnBeforeOnRun",0],[110,"call","InitSetupTables",0],[111,"call","InitSourceCodeSetup",0],[112,"call","InitStandardTexts",0],[113,"call","InitReportSelection",0],[114,"call","InitJobWIPMethods",0],[115,"call","InitBankExportImportSetup",0],[116,"call","InitDocExchServiceSetup",0],[117,"ext","table",1252,"InsertDefaultMatchingRules",0],[118,"ext","codeunit",249,"InitServiceSetup",0],[119,"ext","codeunit",1502,"InitWorkflow",0],[120,"ext","table",1237,"CreateDefaultTransformations",0],[121,"call","InitElectronicFormats",0],[122,"call","InitApplicationAreasForSaaS",0],[123,"ext","codeunit",9999,"SetAllUpgradeTags",0],[125,"event","OnCompanyInitialize",0]]},{"name":"InitializeCompany","line":277,"kind":"procedure","access":"internal","params":0,"steps":[[282,"run","codeunit",2]]},{"name":"InitSetupTables","line":285,"kind":"procedure","params":0,"steps":[[315,"write",98,"Insert"],[320,"write",311,"Insert"],[325,"write",5079,"Insert"],[330,"write",5122,"Insert"],[335,"write",312,"Insert"],[340,"write",313,"Insert"],[345,"write",314,"Insert"],[350,"write",315,"Insert"],[355,"write",5603,"Insert"],[360,"write",5218,"Insert"],[365,"write",5769,"Insert"],[370,"write",5719,"Insert"],[375,"write",843,"Insert"],[381,"write",1108,"Insert"],[386,"write",905,"Insert"],[391,"write",743,"Insert"],[396,"write",326,"Insert"],[401,"write",8627,"Insert"],[406,"write",1806,"Insert"],[411,"write",131,"Insert"],[416,"write",1312,"Insert"],[422,"write",79,"Insert"],[427,"write",443,"Insert"],[432,"write",189,"Insert"],[435,"event","OnAfterInitSetupTables",0]]},{"name":"InitSourceCodeSetup","line":438,"kind":"procedure","access":"local","params":0,"steps":[[445,"call","InsertSourceCode",3],[446,"call","InsertSourceCode",3],[447,"call","InsertSourceCode",3],[448,"call","InsertSourceCode",3],[448,"call","ReportName",1],[449,"call","InsertSourceCode",3],[449,"call","ReportName",1],[450,"call","InsertSourceCode",3],[450,"call","ReportName",1],[451,"call","InsertSourceCode",3],[451,"call","ReportName",1],[452,"call","InsertSourceCode",3],[453,"call","InsertSourceCode",3],[453,"call","PageName",1],[454,"call","InsertSourceCode",3],[454,"call","PageName",1],[455,"call","InsertSourceCode",3],[455,"call","PageName",1],[456,"call","InsertSourceCode",3],[456,"call","PageName",1],[457,"call","InsertSourceCode",3],[457,"call","PageName",1],[458,"call","InsertSourceCode",3],[458,"call","PageName",1],[459,"call","InsertSourceCode",3],[459,"call","PageName",1],[460,"call","InsertSourceCode",3],[461,"call","InsertSourceCode",3],[461,"call","PageName",1],[462,"call","InsertSourceCode",3],[462,"call","PageName",1],[463,"call","InsertSourceCode",3],[463,"call","PageName",1],[464,"call","InsertSourceCode",3],[464,"call","PageName",1],[465,"call","InsertSourceCode",3],[465,"call","PageName",1],[466,"call","InsertSourceCode",3],[466,"call","PageName",1],[467,"call","InsertSourceCode",3],[468,"call","InsertSourceCode",3],[469,"call","InsertSourceCode",3],[470,"call","InsertSourceCode",3],[471,"call","InsertSourceCode",3],[472,"call","InsertSourceCode",3],[473,"call","InsertSourceCode",3],[474,"call","InsertSourceCode",3],[475,"call","InsertSourceCode",3],[475,"call","ReportName",1],[476,"call","InsertSourceCode",3],[476,"call","ReportName",1],[477,"call","InsertSourceCode",3],[477,"call","ReportName",1],[478,"call","InsertSourceCode",3],[478,"call","ReportName",1],[479,"call","InsertSourceCode",3],[479,"call","ReportName",1],[480,"call","InsertSourceCode",3],[480,"call","ReportName",1],[481,"call","InsertSourceCode",3],[482,"call","InsertSourceCode",3],[482,"call","ReportName",1],[483,"call","InsertSourceCode",3],[483,"call","ReportName",1],[484,"call","InsertSourceCode",3],[485,"call","InsertSourceCode",3],[486,"call","InsertSourceCode",3],[487,"call","InsertSourceCode",3],[487,"call","ReportName",1],[488,"call","InsertSourceCode",3],[488,"call","PageName",1],[489,"call","InsertSourceCode",3],[489,"call","PageName",1],[490,"call","InsertSourceCode",3],[490,"call","PageName",1],[491,"call","InsertSourceCode",3],[491,"call","ReportName",1],[492,"call","InsertSourceCode",3],[492,"call","ReportName",1],[493,"call","InsertSourceCode",3],[493,"call","ReportName",1],[494,"call","InsertSourceCode",3],[494,"call","ReportName",1],[495,"call","InsertSourceCode",3],[496,"call","InsertSourceCode",3],[496,"call","ReportName",1],[497,"call","InsertSourceCode",3],[497,"call","ReportName",1],[498,"call","InsertSourceCode",3],[498,"call","PageName",1],[499,"call","InsertSourceCode",3],[499,"call","PageName",1],[500,"call","InsertSourceCode",3],[500,"call","PageName",1],[501,"call","InsertSourceCode",3],[501,"call","ReportName",1],[502,"call","InsertSourceCode",3],[503,"call","InsertSourceCode",3],[504,"call","InsertSourceCode",3],[505,"call","InsertSourceCode",3],[506,"call","InsertSourceCode",3],[507,"call","InsertSourceCode",3],[508,"call","InsertSourceCode",3],[509,"call","InsertSourceCode",3],[510,"call","InsertSourceCode",3],[511,"call","InsertSourceCode",3],[512,"call","InsertSourceCode",3],[512,"call","PageName",1],[513,"call","InsertSourceCode",3],[513,"call","PageName",1],[514,"call","InsertSourceCode",3],[514,"call","PageName",1],[515,"call","InsertSourceCode",3],[516,"call","InsertSourceCode",3],[517,"call","InsertSourceCode",3],[518,"call","InsertSourceCode",3],[519,"event","OnBeforeSourceCodeSetupInsert",0],[520,"write",242,"Insert"]]},{"name":"InitStandardTexts","line":524,"kind":"procedure","access":"local","params":0,"steps":[[529,"call","InsertStandardText",2],[530,"call","InsertStandardText",2],[531,"call","InsertStandardText",2],[532,"call","InsertStandardText",2]]},{"name":"InitReportSelection","line":536,"kind":"procedure","access":"local","params":0,"steps":[[549,"ext","codeunit",1901,"InitReportSelectionSales",0],[550,"ext","codeunit",1901,"InitReportSelectionPurch",0],[551,"ext","codeunit",1901,"InitReportSelectionBank",0],[552,"ext","codeunit",1901,"InitReportSelectionCust",0],[553,"ext","codeunit",1901,"InitReportSelectionInvt",0],[554,"ext","codeunit",1901,"InitReportSelectionProd",0],[555,"ext","codeunit",1901,"InitReportSelectionServ",0],[556,"ext","codeunit",1901,"InitReportSelectionWhse",0],[557,"ext","codeunit",1901,"InitReportSelectionJob",0]]},{"name":"InitJobWIPMethods","line":560,"kind":"procedure","access":"local","params":0,"steps":[[565,"call","InsertJobWIPMethod",5],[567,"call","InsertJobWIPMethod",5],[569,"call","InsertJobWIPMethod",5],[571,"call","InsertJobWIPMethod",5],[573,"call","InsertJobWIPMethod",5]]},{"name":"InitBankExportImportSetup","line":578,"kind":"procedure","access":"local","params":0,"steps":[[583,"call","InsertBankExportImportSetup",6],[585,"call","InsertBankExportImportSetup",6],[587,"call","InsertBankExportImportSetup",6],[589,"call","InsertBankExportImportSetup",6],[592,"event","OnAfterInitBankExportImportSetup",0]]},{"name":"InitDocExchServiceSetup","line":616,"kind":"procedure","access":"local","params":0,"steps":[[622,"ext","table",1275,"SetURLsToDefault",0],[623,"write",1275,"Insert"]]},{"name":"InitElectronicFormats","line":627,"kind":"procedure","access":"local","params":0,"steps":[[634,"ext","table",61,"InsertElectronicFormat",5],[638,"ext","table",61,"InsertElectronicFormat",5],[642,"ext","table",61,"InsertElectronicFormat",5],[646,"event","OnAfterInitElectronicFormats",0]]},{"name":"InsertSourceCode","line":649,"kind":"procedure","params":3,"steps":[[657,"write",230,"Insert"]]},{"name":"InsertStandardText","line":660,"kind":"procedure","access":"local","params":2,"steps":[[667,"write",7,"Insert"]]},{"name":"PageName","line":670,"kind":"procedure","params":1,"steps":[[674,"ext","table",377,"TranslateObject",2]]},{"name":"ReportName","line":677,"kind":"procedure","access":"local","params":1,"steps":[[681,"ext","table",377,"TranslateObject",2]]},{"name":"InsertJobWIPMethod","line":684,"kind":"procedure","access":"local","params":5,"steps":[[698,"write",1006,"Insert"]]},{"name":"InsertBankExportImportSetup","line":701,"kind":"procedure","access":"internal","params":6,"steps":[[713,"write",1200,"Insert"]]},{"name":"InitApplicationAreasForSaaS","line":716,"kind":"procedure","access":"local","params":0,"steps":[[725,"ext","codeunit",9179,"SetHideApplicationAreaError",1],[726,"ext","codeunit",9179,"GetExperienceTierCurrentCompany",1],[727,"ext","codeunit",457,"IsSaaS",0],[730,"ext","codeunit",1306,"IsDemoCompany",0],[731,"ext","codeunit",9179,"SaveExperienceTierCurrentCompany",1],[733,"ext","codeunit",9179,"SaveExperienceTierCurrentCompany",1],[738,"ext","codeunit",9179,"RefreshExperienceTierCurrentCompany",0]]},{"name":"OnAfterCompanyDeleteRemoveReferences","line":752,"kind":"procedure","access":"local","params":2,"steps":[[764,"write",1802,"DeleteAll"],[766,"write",9178,"DeleteAll"],[768,"write",9650,"DeleteAll"],[770,"write",9651,"DeleteAll"],[773,"write",9176,"Delete"]]},{"name":"CompanyInitializeOnAfterLogin","line":777,"kind":"procedure","access":"local","params":0,"steps":[[784,"ext","codeunit",4030,"GetCurrentClientType",0],[790,"call","InitializeCompany",0]]}]}