AXForum  
Вернуться   AXForum > Microsoft Dynamics NAV > NAV: Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 23.10.2018, 10:11   #1  
Blog bot is offline
Blog bot
Участник
 
21,179 / 725 (67) +++++++
Регистрация: 28.10.2006
waldo: Application-wide system events (previously known as “Codeunit 1 events”)
Источник: https://dynamicsuser.net/nav/b/waldo...eunit-1-events
==============

You must have heard. Codeunit 1 is a goner! And if you have not heard it – you must have read about it. Because it has been on Microsoft Docks for a while, and also there was a blog that Microsoft spent on it.

Well, before I managed to find these description, I was working on my own overview ;-). So let me share it – I do believe that I look at it from another angle.

Where are my events?

If we want to extend codeunit 1, we have been subscribing to events. And if not – you should have ;-). So, first question would be – where are the events that we were subscribing to??

Well, I made my own overview of all the published events in codeunit 1, and the mapping to the new event in the table below:

OnCheckPreconditionsPerCompanyCodeunit.PROCEDUREOnCheckPreconditionsPerDatabaseCodeunit.PROCEDUREOnInstallAppPerCompanyNOT AVAILABLE ANYMOREOnInstallAppPerDatabaseNOT AVAILABLE ANYMOREOnUpgradePerCompanyCodeunit.PROCEDUREOnUpgradePerDatabaseCodeunit.PROCEDUREOnValidateUpgradePerCompanyCodeunit.PROCEDUREOnValidateUpgradePerDatabaseCodeunit.PROCEDUREOnAfterAutoFormatTranslateCodeunit.PROCEDUREOnAfterCaptionClassTranslateCodeunit.PROCEDUREOnAfterCompanyCloseCodeunit.PROCEDUREOnAfterCompanyOpenCodeunit.PROCEDUREOnAfterFindPrinterCodeunit.PROCEDURE<span style="color:red;"OnAfterGetPrinterName/span>OnAfterGetApplicationVersionCodeunit.PROCEDUREOnAfterGetDatabaseTableTriggerSetupCodeunit.PROCEDUREOnAfterGetDefaultRoleCenterCodeunit.PROCEDUREOnAfterGetGlobalTableTriggerMaskCodeunit.PROCEDUREOnAfterGetSystemIndicatorTable.PROCEDUREOnAfterHasCustomLayoutCodeunit.PROCEDUREOnAfterMakeCodeFilterNOT AVAILABLE ANYMOREOnAfterMakeDateFilterCodeunit.PROCEDUREOnAfterMakeDateTextNOT AVAILABLE ANYMOREOnAfterMakeDateTimeFilterCodeunit.PROCEDUREOnAfterMakeTextNOT AVAILABLE ANYMOREOnAfterMakeTextFilterCodeunit.PROCEDUREOnAfterMakeTimeFilterCodeunit.PROCEDUREOnAfterMakeTimeTextNOT AVAILABLE ANYMOREOnAfterOnDatabaseDeleteCodeunit.PROCEDUREOnAfterOnDatabaseInsertCodeunit.PROCEDUREOnAfterOnDatabaseModifyCodeunit.PROCEDUREOnAfterOnDatabaseRenameCodeunit.PROCEDUREOnAfterOnGlobalDeleteCodeunit.PROCEDUREOnAfterOnGlobalInsertCodeunit.PROCEDUREOnAfterOnGlobalModifyCodeunit.PROCEDUREOnAfterOnGlobalRenameCodeunit.PROCEDUREOnAfterReportGetCustomRdlcTable.PROCEDUREOnBeforeCompanyCloseCodeunit.PROCEDUREOnBeforeCompanyOpenCodeunit.PROCEDUREOnBeforeOnDatabaseDeleteCodeunit.PROCEDUREOnBeforeOnDatabaseInsertCodeunit.PROCEDUREOnBeforeOnDatabaseModifyCodeunit.PROCEDUREOnBeforeOnDatabaseRenameCodeunit.PROCEDUREOnBeforeOpenSettingsCodeunit.PROCEDUREOnEditInExcelCodeunit.PROCEDUREOnRoleCenterOpenCodeunit.PROCEDURE
I indicated in red the ones that need a bit attention, as either they are not available, or are renamed.. .

Are there new events as well?

Yes! And quite many of them. I just don’t know how I can give you a complete overview of all the events “that could have been in codeunit 1, but are now spread over multiple codeunits.. “. So, let me just give you a few tips of where you could find such “generic” or “platform wide” or “…” events.

In my opinion, the below codeunits have these kind of events that I think are very interesting in a application-wide-context:
  • LogInManagement
  • ReportManagement
  • Application System Constants
  • Conf./Personalization Mgt.
  • TextManagement
  • AutoFormatManagement
  • CaptionManagement
  • GlobalTriggerManagement
  • SaaS Log In Management
  • Company Information
  • Custom Report Layout
  • ODataUtility
  • Data Upgrade Mgt.
So. Just to help you … I created another list with events which I think are quite interesting for you. In bold, you see the ones that didn’t exist in Codeunit 1.
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Table.PROCEDURE
  • Table.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
  • Codeunit.PROCEDURE
But that’s not all…

If you look for example into Codeunit “LoginManagement”, you’ll see that it subscribes to an event called “OnCompanyClose”, which is an event in codeunit “2000000003”.



I wasn’t able to export that codeunit (with powershell, nor with the classic client) – and even found a few more like those codeunits. In classic environment, this is what I saw:



So all these codeunits end with “Triggers” – which means in VSCode, we are able to access them with Intellisense like:



Here is an overview of all the events in these “system trigger codeunits”:

Company TriggersOnCompanyCloseCompany TriggersOnCompanyOpenDebugger TriggersOnDebuggerBreakExtension TriggersOnInstallAppPerCompanyExtension TriggersOnInstallAppPerDatabaseGlobal TriggersGetDatabaseTableTriggerSetupGlobal TriggersGetGlobalTableTriggerMaskGlobal TriggersOnDatabaseDeleteGlobal TriggersOnDatabaseDeleteGlobal TriggersOnDatabaseInsertGlobal TriggersOnDatabaseModifyGlobal TriggersOnDatabaseRenameGlobal TriggersOnGlobalDeleteGlobal TriggersOnGlobalInsertGlobal TriggersOnGlobalModifyGlobal TriggersOnGlobalRenameUpgrade TriggersOnCheckPreconditionsPerCompanyUpgrade TriggersOnCheckPreconditionsPerDatabaseUpgrade TriggersOnUpgradePerCompanyUpgrade TriggersOnUpgradePerDatabaseUpgrade TriggersOnValidateUpgradePerCompanyUpgrade TriggersOnValidateUpgradePerDatabaseVersion TriggersGetApplicationBuildVersion TriggersGetApplicationVersionVersion TriggersGetReleaseVersionReporting TriggersGetPaperTrayForReportReporting TriggersGetPrinterNameReporting TriggersHasCustomLayoutReporting TriggersMergeDocumentReporting TriggersReportGetCustomRdlcReporting TriggersScheduleReportReporting TriggersSubstituteReportUI Helper TriggersAutoFormatTranslateUI Helper TriggersCaptionClassTranslateUI Helper TriggersGetApplicationLanguageUI Helper TriggersGetCueStyleUI Helper TriggersGetDefaultRoundingPrecisionUI Helper TriggersGetSystemIndicatorFilter Helper TriggersMakeCodeFilterFilter Helper TriggersMakeDateFilterFilter Helper TriggersMakeDateTimeFilterFilter Helper TriggersMakeIntFilterFilter Helper TriggersMakeTextFilterFilter Helper TriggersMakeTimeFilterSystem Action TriggersCustomizeChartSystem Action TriggersGetDefaultRoleCenterIDSystem Action TriggersInvokeExtensionInstallationSystem Action TriggersOnEditInExcelSystem Action TriggersOpenContactMSSalesSystem Action TriggersOpenDebuggerSystem Action TriggersOpenSettings
I’m not sure in how to use all of them – but it is a great help to simply look into the code of Busines Central, as most (if not all) of these events exist because Microsoft needed them. You can figure out how to use them, and in many cases, you’ll find what are the actual events you should use as a developer.

Enjoy!




Источник: https://dynamicsuser.net/nav/b/waldo...eunit-1-events
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
saurav-nav: NAV 2018 - Lots of New Objects! Blog bot NAV: Blogs 0 04.12.2017 10:11
waldo: NAV 2017: All Published Events Blog bot NAV: Blogs 0 04.11.2016 06:15
Ошибка бизнес-процесса Tarasov E Dynamics CRM: Разработка 9 18.02.2010 14:02
Права на добавление объектов в Дизайнере Cyr NAV: Администрирование 10 13.06.2009 21:27
wiki.dynamicsbook: Changes Made in Navision Attain 3.60 Blog bot Dynamics CRM: Blogs 0 02.09.2008 13:23
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 11:37.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.