One question that is raised a lot lately is how events and hooks are compared and when to use events and when to use hooks.
The answer to this question is very simple if you are not on NAV2016, as one of my Partner Ready Software friends said at NAVTechDays: you can only use hooks.
If there was a Pattern of the year award, last year the Arguments table would have won. The year before the Hook pattern. Or maybe that was the year before.
This year in my opinion it is the Handled pattern by Thomas Hejlsberg in combination with Events. It is not yet published by Microsoft on the wiki, but let me try to explain how it works and why I like it.
In Microsoft Dynamics NAV we don’t have Abstract Classes or Inheritance. These are modern technologies that make sure that objects in your application have similar elements and signatures.
Despite the lack of these modern concepts NAV does have many tables and codeunits that follow similar structures by design. This has been like this ever since the early days in the 1980s.
Back home from NAVTechDays. It’s a rainy saturday, nothing much to do in the garden. Kids are playing or doing their saturday activities with sports and scouting. I figured it was time for me to catch up with bookkeeping and some paperwork after all the traveling.
There have been some blogs already about the new code editor that we have in NAV2016. In these blogs I miss two “features” that are not highligted.
The first one is really about highlighting:
In Microsoft Dynamics NAV 2016 CU1, support for VS2015 Community Edition has been implemented.
However if you do a default install of VS2015CE, the RDLC editor is not included and your report will show up as XML instead of the visual designer.
If you upgrade your database to NAV2016 using the PowerShell Merge commandlets and have a change to table 49 you will run into this issue.
Table 49 is the Invoice Posting Buffer table that NAV uses to create G/L entries for each unique combination of values in the Sales and Purchase documents. With the NAV2016 release Microsoft have added the Deferral Code field to this table and the primary key.