Skip to main content

Time to Say Good Bye for Codeunit 1.

Hi all,

We all have used Codeunit 1 "ApplicationManagement" some way or other. It was used for so many customizations till NAV 2018 using Codeunit 1.

Remember - Report Logger, ChangeLog, Checking Build Number,  System Indicators, DateText Functions, and others that we would have used in Codeunit 1.



But Microsoft decided to drop codeunit 1 going forward with Business Central Release and it's not a bug.

So what happens to our functions that we were using. Don't worry Microsoft have moved those function to other code units which can be rewritten during an upgrade to business Central.

Few other updates - 
1. New ‘system’ codeunits have been introduced in the 2 billion range.
2. These special codeunits are created by C/SIDE when a database is created automatically.
3. These new system codeunits do not contain code, all they contain are event publishers.
4. Microsoft added subscribers to these new business events in various places.
5. All the functionality still works as before, no functionality was removed.

Official Announcement - https://blogs.msdn.microsoft.com/nav/2018/09/12/new-system-events-replace-codeunit-1-in-business-central-october18-release/


Which functions become which events?

Codeunit 1 function nameNew Object TypeNew Object IDNew function name
CompanyOpenCodeunit40CompanyOpen
GetSystemIndicatorCodeunit40GetSystemIndicator
CompanyCloseCodeunit40CompanyClose
FindPrinterCodeunit44GetPrinterName
ApplicationVersionCodeunit9015ApplicationVersion
CustomApplicationVersionN/AN/AN/A
ReleaseVersionCodeunit9015ReleaseVersion
ApplicationBuildCodeunit9015ApplicationBuild
CustomApplicationBuildN/AN/AN/A
ApplicationLanguageCodeunit43ApplicationLanguage
DefaultRoleCenterCodeunit9170DefaultRoleCenterID
MakeDateTimeTextCodeunit41MakeDateTimeText
GetSeparateDateTimeCodeunit41GetSeparateDateTime
MakeDateTextCodeunit41MakeDateText
MakeTimeTextCodeunit41MakeTimeText
MakeTextCodeunit41MakeText
MakeDateTimeFilterCodeunit41MakeDateTimeFilter
MakeDateFilterCodeunit41MakeDateFilter
MakeTextFilterCodeunit41MakeTextFilter
MakeCodeFilterCodeunit41MakeTextFilter
MakeTimeFilterCodeunit41MakeTimeFilter
AutoFormatTranslateCodeunit45AutoFormatTranslate
ReadRoundingCodeunit45ReadRounding
CaptionClassTranslateCodeunit42CaptionClassTranslate
GetCueStyleCodeunit9701GetCueStyle
SetGlobalLanguageCodeunit43SetGlobalLanguage
ValidateApplicationlLanguageCodeunit43ValidateApplicationLanguage
LookupApplicationlLanguageCodeunit43LookupApplicationLanguage
GetGlobalTableTriggerMaskCodeunit49GetGlobalTableTriggerMask
OnGlobalInsertCodeunit49OnGlobalInsert
OnGlobalModifyCodeunit49OnGlobalModify
OnGlobalDeleteCodeunit49OnGlobalDelete
OnGlobalRenameCodeunit49OnGlobalRename
GetDatabaseTableTriggerSetupCodeunit49GetDatabaseTableTriggerSetup
OnDatabaseInsertCodeunit49OnDatabaseInsert
OnDatabaseModifyCodeunit49OnDatabaseModify
OnDatabaseDeleteCodeunit49OnDatabaseDelete
OnDatabaseRenameCodeunit49OnDatabaseRename
OnDebuggerBreakCodeunit9500ProcessOnDebuggerBreak
LaunchDebuggerCodeunit9500OpenDebugger
OpenSettingsCodeunit9170OpenSettings
OpenContactMSSalesCodeunit50OpenContactMSSales
InvokeExtensionInstallationCodeunit2501InvokeExtensionInstallation
CustomizeChartCodeunit9180CustomizeChart
HasCustomLayoutCodeunit44HasCustomLayout
MergeDocumentCodeunit44MergeDocument
ReportGetCustomRdlcCodeunit44ReportGetCustomRdlc
ReportSchedulerCodeunit44ScheduleReport
OnBeforeOpenSettingsCodeunit9170OnBeforeOpenSettings
OnAfterGetApplicationVersionCodeunit9015OnAfterGetApplicationVersion
OnBeforeCompanyOpenCodeunit40OnBeforeCompanyOpen
OnAfterCompanyOpenCodeunit40OnAfterCompanyOpen
OnRoleCenterOpenCodeunit9170OnRoleCenterOpen
OnBeforeCompanyCloseCodeunit40OnBeforeCompanyClose
OnAfterCompanyCloseCodeunit40OnAfterCompanyClose
OnAfterGetSystemIndicatorTable79OnAfterGetSystemIndicator
OnAfterFindPrinterCodeunit44OnAfterGetPrinterName
OnAfterGetDefaultRoleCenterCodeunit9170OnAfterGetDefaultRoleCenter
OnAfterMakeDateTextN/AN/AN/A
OnAfterMakeTimeTextN/AN/AN/A
OnAfterMakeTextN/AN/AN/A
OnAfterMakeDateTimeFilterCodeunit41OnAfterMakeDateTimeFilter
OnAfterMakeDateFilterCodeunit41OnAfterMakeDateFilter
OnAfterMakeTextFilterCodeunit41OnAfterMakeTextFilter
OnAfterMakeCodeFilterN/AN/AN/A
OnAfterMakeTimeFilterCodeunit41OnAfterMakeTimeFilter
OnAfterAutoFormatTranslateCodeunit45OnAfterAutoFormatTranslate
OnAfterCaptionClassTranslateCodeunit42OnAfterCaptionClassTranslate
OnAfterGetGlobalTableTriggerMaskCodeunit49OnAfterGetGlobalTableTriggerMask
OnAfterOnGlobalInsertCodeunit49OnAfterOnGlobalInsert
OnAfterOnGlobalModifyCodeunit49OnAfterOnGlobalModify
OnAfterOnGlobalDeleteCodeunit49OnAfterOnGlobalDelete
OnAfterOnGlobalRenameCodeunit49OnAfterOnGlobalRename
OnAfterGetDatabaseTableTriggerSetupCodeunit49OnAfterGetDatabaseTableTriggerSetup
OnAfterOnDatabaseInsertCodeunit49OnAfterOnDatabaseInsert
OnAfterOnDatabaseModifyCodeunit49OnAfterOnDatabaseModify
OnAfterOnDatabaseDeleteCodeunit49OnAfterOnDatabaseDelete
OnAfterOnDatabaseRenameCodeunit49OnAfterOnDatabaseRename
OnAfterHasCustomLayoutCodeunit44OnAfterHasCustomLayout
OnAfterReportGetCustomRdlcTable9650OnAfterReportGetCustomRdlc
OnBeforeOnDatabaseInsertCodeunit49OnBeforeOnDatabaseInsert
OnBeforeOnDatabaseModifyCodeunit49OnBeforeOnDatabaseModify
OnBeforeOnDatabaseDeleteCodeunit49OnBeforeOnDatabaseDelete
OnBeforeOnDatabaseRenameCodeunit49OnBeforeOnDatabaseRename
OnEditInExcelCodeunit6710OnEditInExcel
OnInstallAppPerDatabaseN/AN/AN/A
OnInstallAppPerCompanyN/AN/AN/A
OnCheckPreconditionsPerDatabaseCodeunit9900OnCheckPreconditionsPerDatabase
OnCheckPreconditionsPerCompanyCodeunit9900RaiseOnCheckPreconditionsPerCompany
OnUpgradePerDatabaseCodeunit9900OnUpgradePerDatabase
OnUpgradePerCompanyCodeunit9900OnUpgradePerCompany
OnValidateUpgradePerDatabaseCodeunit9900OnValidateUpgradePerDatabase
OnValidateUpgradePerCompanyCodeunit9900OnValidateUpgradePerCompany


Will try to come back at the same pace for blogging and will keep you updated. I have so much to share about the learnings that I had during the last 6-8 months.

Stay tuned.

Regards,
Saurav Dhyani
www.sauravdhyani.com

Comments

Popular posts from this blog

VIEW SERVER STATE permission on SQL Server?

Hi all, Sometime While trying to Login into a database we face an error message as shown below. --------------------------- Microsoft Dynamics NAV Classic --------------------------- You cannot start Microsoft Dynamics NAV Classic because you do not have the VIEW SERVER STATE permission on SQL Server. Contact your system administrator. --------------------------- OK    ---------------------------

RTC Report It is not possible to instantiate the Visual Studio bridge.

Hi all, As a Navision developers I have Multiple Versions of Navision running in single Machine. As discussed Earlier in the post how to run multiple Version of RTC in single machine. So my machine have following details for RTC Versions - NAV 2009 R2    - is installed. NAV 2009 SP1  - is copied at C:\Program Files (x86)\Microsoft Dynamics NAV\60\NAV 6.0 SP1 IN\ NAV 2009         - is copied at C:\Program Files (x86)\Microsoft Dynamics NAV\60\NAV 6.0 IN\ This approach has been working great for execution of Classic and RTC Clients. However, after installing Dynamics NAV 2009 R2, if i tried to view the Layout for an NAV 2009 SP1 Report i was getting the following error: ---------------------------  Microsoft Dynamics NAV Classic  ---------------------------  It is not possible to instantiate  the Visual Studio bridge.  ---------------------------  OK    --------------------------- After searchi...

NAV 2013 R2 - Cumulative update 12 Released.

Hi all, Please find below the details of  Cumulative Update 12 released for Microsoft Dynamics NAV 2013 R2. Title - Cumulative Update 12 for Microsoft Dynamics NAV 2013 R2 Build No. - 38053 Release Date - October, 2014 Local Version Included - AU, AT, BE, CH, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, SE, UK, RU Download Link Note: Implementing this cumulative update will require a database conversion unless you have already implemented update rollup 5.