Error compiling dynamic control expression

Dynamic expressions in NAV2015 is a great way to automate user interfaces behavior. In the example below we wants to control the Editable status of a field.

The special part is, that if you start using boolean operators like OR AND NOT – You might hit an error message like this:


Funny enough, it is actually a case sensitivity bug in NAV. Change the lowercase and into AND and everything works as excepted.

So even if C/AL is not case sensitive, the dynamic expressions are :)

So my NAV 2015 help server does not return anything when searching

If your NAV 2015 Help Server just replies:

No Results Found For: customer

No matter what you search for, it because the help server uses the indexing service on your server and you have not added the “help” folder to indexing.


So if your Indexing Options dialog look like this (opened from the Control Panel) you need to add the “Help” folder (found in c:\inetpub\wwwroot\DynamicsNAV80Help\ ) to indexing, like this:


Don’t be alarmed if it takes 10-15 minutes before the search returns results, it just need to index all the files…

All of the Microsoft pages dedicated to the Help Server fails to tell that the Indexing service is used and required:


Been thinking a lot about my HoloLens Academy Experience ..

After I attended the HoloLens Academy at Build 2015, one question continues to come back in my head:

What would I do with a HoloLens “Dev Kit” ?

Well the HoloLens is about two things:

1. Bringing objects into the physical world and interact with them

2. Change the appearance of the physical world

There is still one more barrier that needs to crossed before we can have a true Star Trek HoloDesk experience – and thats the physical properties of the holograms. We cannot touch them, there is not tactile feedback from a Hologram. Next step would be to combine the HoloLens with with something like this:

The HoloLens can only project holograms in the sweetspot of our vision, so anything that need peripheral vision will not work. An example of that would be soccer, you don’t want to walk around looking at your feet with a HoloLens.

In many ways, you can compare the HoloLens introduction with the Nintendo Wii. There is going to be a few games (Like the Wii Play suite) to get users confortable with the HoloLens. I would love to make a paint throwing game for that:

Imaging a game, where you can throw “paint bombs” in your living room. Use the gaze to aim, perhaps even get a hologram laserpointer, and then use a voice command to throw the paint. That would be fun :)

Another “no-brainer” App would be Cortana – Imaging calling out the “Hey Cortana” and she materialize right in from of your, again in true Star Trek transporter style, and ask what she can help you with. That would be a very cool demo app.

When it comes to business apps, its more in the visualization department I see the HoloLens. If we ever wanted to add a cargo configurator to Glomaris that would be a fun place to add HoloLens support. Imaging your vessel and the different cargoes as a holograms, and you can start trying to see if the jigsaw can be solved. In Foqus Finance a car configurator (change colors, rims, etc.) could also be a HoloLens experience.

I have the website, where you can design mouthpieces for brass instruments. How about a HoloLens designer, where you can, in real-time, construct your mouthpieces. And the finally with a voice command “Print mouthpiece” – sends the model to your 3D printer !


So i tried a HoloLens today


Today i participated in the HoloLens Academy and it was an awesome experience.

The actual devices was guarded in a no-personal-electronics-zone so the picture above was the closest my camera came to a HoloLens.

The academy was a walk through with Unity and Visual Studio to create our own HoloLens App.

The first hologram we got to play with was a test app. A remote controlled car that we could get to drive around – Mind Blown ! This actually works !!

But this was a developer session, and we wanted our own holograms. So introducing Unity (beta):

We started by creating a simple scene in Unity, adding a few object. Then we replaced the standard camera with a HoloLens camera and pressed build. After that we needed to open the outputted solution with Visual Studio 2015 and pressed run…

And we got our own holograms, mind blown again :)

Then followed a series of making this demo app more and more complex. Adding voice commands, adding object interaction, adding surround sound..

The final state of our app included a hole in the floor where we could look into a “underworld” with bird, clouds and a landscape..

Mind blown again !

Final comments:

If you are using glasses, you need to remove the nose piece, otherwise the “screen” will not be placed correctly.

The field of view is much smaller than the keynote presentation showed us. This does not take anything away from HoloLens, and you forget it after a short while.

This is a awesome piece of hardware, and I can’t wait to try this again, thanks to Dave for being a great mentor during the academy.

Dynamics at //Build 2015

EH-LUMIA2520 - WIN_20150429_095236Right now the keynote for //Build 2015 is running. And something has changed, Dynamics has already being mentioned TWICE !!
At Build 2012 in Seattle Dynamics wasn’t even on a slide with ERP system shown at the keynote.

One more, Dynamics AX mentioned during the Office Graph talk.

Dynamics apps in the new Windows Store For Business

I will keep updating this post with Build+Dynamics impressions.

Stupid error on a friday :)

Today I upgraded a virtual machine running NAV2015 from Update 5 to Update 6. Not a big deal, but during the process I managed to delete the CustomSettings.config file – Stupid mistake on my part.

This file holds the entire configuration for the NAV Service Tier, from authentication of client to SQL Server connection and more.

But the real question I’m left with is:

Why does NAV keep its setting files under C:\Program Files ?

With the introduction of Longhorn (Windows Vista/Windows Server 2008) and UAC – Writing inside c:\Program Files became a elevated operation, so only users with Administrator rights could write there. After that, most programs began to use c:\ProgramData or storing setup and data under c:\Users. There is even a blog from Microsoft on the subject.

Funny enough, SQL Server still defaults its location for DATA under c:\Program files unless changed during the install. They properly keept it there for historic reasons – It has been that way since SQL Server 6.5.

But NAV does not have that history restriction, so from my perspective, this can be added to Luc’s  Lets clean up NAV list.

Anyway, that was my friday rant :)

User documentation of a NAV solution

In this series of articles I will explain a alternative method of handling user documentation for Microsoft Dynamics NAV 2015 code.

In E Foqus we use this for our ISV product Foqus Finance, but it can be used for any NAV solution, ranging from a small customer modification to huge ISV solutions (as Foqus Finance)

We have tried to solved a series of challenges with documentation:

First challenge: Documentation is dead the minute you’re finish writing it. Code changes, customers want it work differently, change requests keeps popping up. And the documentation (if any) stays at the initial level

Second challenge: Documentation is kept in documents (Word/PDF) sitting on local drives, attached to email, stored on file shares, often in multiple versions without any clear version strategy.

Third challenge: Customer want F1 help, and this has historical been an nightmare to create with NAV – from compiling CHM files with 3rd party tools to distribute files to clients.

Fourth challenge: New formats comes along all the time, creating an ebook with the help would be a very modern thing to do.

Read on for our solution to all this:

Step 1 – Organizing the input text
Step 2 – Getting structure into our documentation
Step 3 – Graphical Layout
Step 4 – Updating the Help Server Table Of Content (ToC.XML)
Step 5 – Editing and storing help text with NAV Code
Step 6 – Running the whole thing

Download the current version of the help toolkit:

EFoqusHelpToolkit 0.03

Further development:

Step 7 – Producing automated screenshots from NAV

Update the NAV2015 ToC.XML

The ToC.XML is a simple recursive structure with entries like this:

<?xml version="1.0" encoding="utf-8"?>
<Node Name="DynamicsHelp" DisplayName="Help" Page="conGettingStarted.htm">
    <Node Name="TechRef" DisplayName="Technical Reference" Page="conTechnicalReference.htm">
      <Node Name="CSIDERef" DisplayName="C/SIDE Reference Guide" Page="conCSIDEReferenceGuide.htm" />
      <Node Name="DevEnvCmds" DisplayName="Development Environment Commands" Page="conDevelopmentEnvironmentCommands.htm" />
      <Node Name="CSIDEwindows" DisplayName="Windows Overview" Page="conWindowOverviews.htm" />
    <Node Name="Upgrade" DisplayName="Upgrading to Microsoft Dynamics NAV 2015" Page="oriUpgradingToNAVCrete.htm">
      <Node Name="MigratingToMultitenancy" DisplayName="Migrating to Multitenancy" Page="conMigratingTenantDatabases.htm" />

Just a name, a title and a page, and that looks very similar to the structure we already have in place from the manual. So we do here, is run through our own Structure.XML, and inserts matching entries into the ToC.

This is the main piece of code that will generate the html files, and update the ToC at the same time:

public bool GenerateAllContentAsHtml()
            XDocument TOC = XDocument.Load(ConfigurationManager.AppSettings["input-toc"]);

            XElement root = (from xml2 in TOC.Descendants("Node")
                             where xml2.Attribute("Name").Value == ConfigurationManager.AppSettings["projectname"]
                             select xml2).FirstOrDefault();
            if (root == null)
                root = GetNode(ConfigurationManager.AppSettings["projectname"], Data.manual.Title, ConfigurationManager.AppSettings["projectname"] + ".htm");
            root.Nodes().Remove(); // If we already have our stuff in this TOC remove it first

            StringBuilder ChapterList = new StringBuilder();
            foreach (var chapter in Data.manual.Chapters)
                string str = "<a href=\"" + ConfigurationManager.AppSettings["projectname"] + "_" + chapter.No + ".htm\" xmlns=\"\">";
                str += chapter.Title + "</a><br>";

            Article preface = Data.Articles.Find(m => m.ID == Data.manual.Preface.ID);
            if (preface == null)
                preface = new Article()
                    ID = Data.manual.Preface.ID,
                    Text = "TODO: Article " + Data.manual.Preface.ID,
                    Title = "TODO: Article Caption " + Data.manual.Preface.ID
            StringBuilder topic = new StringBuilder(File.ReadAllText(ConfigurationManager.AppSettings["helppage-html"]));
            topic.Replace("$1$", preface.Title);
            topic.Replace("$1$", preface.Title);
            topic.Replace("$2$", ConvertMarkdown(preface.Text, "html") + ChapterList);
                ConfigurationManager.AppSettings["output-path-helpserver"] + @"\" +
                ConfigurationManager.AppSettings["projectname"] + ".htm", topic.ToString());

            return false;