Category Archives: NAV Architecture, Patterns & Code

Design Patterns are common solutions best practices to solve problems. This is a well known concept in computer programming and can therefore be applied to Microsoft Dynamics NAV as well.

Tip #58 | Run Extension Objects

One of the quirks of working with extensions is that you cannot run an object from the object designer. This is true for V1 and V2.

With V2 you can start an object (page) after deploy but this only works once and only in the WebClient.

If you just quickly want to check our a page or codeunit in the Windows client you can write a codeunit against an object that does not exist.

An example is the TowersOfHanoi app that Microsoft ships as example. This does not have a page extension to execute itself.

Works all the time.

Want to learn more about extensions? Contact me today!

Advertisements

Step 3 – Wizards | ForNAV App Building

Wizard pages are working on a revival from being almost forgotten. They were first introduced as form objects in Navision 3.0 as part of CRM. I instantly fell in love and started to create them for my own add-on.

Wizard pages have a few great advantages to normal pages and let’s go over them.

  1. Save Button – Even though it is not called “Save” the Wizard page is one of the few options in NAV you have to populate data, validate it and cancel the operation without a hassle.
  2. Overview – Essentially Wizard pages have fast tabs just like Card pages but the tabs are only displayed one at a time giving a clearer overview
  3. Validation – Wizard pages allow the programmer to clearly validate the contents of each fast tab before continuing to the next fast tab. Much more precise than normal database validation since with a wizard you can asume, program, for a really specifical order of entry.
  4. Explanation – On each page (tab) of the wizard you can write half a bible explaining to the user what to do. Be careful not to over do it since people these days are not used to sit down and read text anymore.

Continue reading

NAV2016CU2 | Obsolete Commands Cleaned Up!

When CU2 was released, I totaly forgot to test something I should have.

Based on my “what the BEEP” post my friends at Microsoft decided that it was time to “clean up” and gave me a heads up.

If you type “BE” in NAV2016CU2 the keyword you get is BEGIN, not BEEP.

THANK YOU TEAM!

NAV2016CU2 Intellisense

From what I have been told the obsolete commands are hardcoded. If you find anything that should be removed, just reply to this blog. Microsoft folks read it :). (Trust me I know).

As far as I could test I could not find the BEEP in the Symbol menu either, but I might have looked in the wrong place.

NAV2016 | Hooks vs. Events

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.
Continue reading

The “Handled” Pattern

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.
Continue reading

NAV2016 | Refactoring & Transaction Mirroring in Codeunit 80 & 90

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.
Continue reading