Let's clean up NAV #8 - More Options, Beyond "Torn Page Detection"
2015-3-14 10:03

Participating in a really worthwhile two days SQL Performance training by Jörg Stryk this week, I heard him pointing out some other "useless" database properties. Beyond Torn Page Detection. Consequently I couldn't do else, but grab Jörg and welcome him to our growing Clean Team! Geeked


Therefor a big welcome to another fellow MVP.

More Options

You might recall when fellow MVP Alain Krikilion joined the team suggesting to clean out the Torn Page Detection toggle on Options tab of the database properties of NAV. Didn't ask him, but he might have found it clean enough. Jörg clearly doesn't, read below.

Single User

Well, this will set the database into a single user mode. This is only possible, if no other connection is established, except for this single NAV Development client. As long as the NST service etc. is running you cannot enable this setting; you’ll be blocked until you receive a timeout.

I’d rather set this in Management Studio (Database Properties) as here you could also tell to “close all existing connections”, hence SQL Server will disconnect anything else automatically.

ANSI NULL default

This setting tells, if NULL values are allowed in tables/fields. This is pure nonsense, as NAV is not capable to deal with any NULL values (it will break down with an error) and automatically makes sure, that all fields have NOT NULL values. Hence, this is a setting which NAV does not need and cannot use.

SQL Developers who have to create tables in that database, but “outside” the NAV application, know how to deal with that if really needed.

Recursive Triggers

Well, the last time NAV used SQL triggers (this setting does NOT refer to NAV triggers!) was in version 5.0 (prior to SP1). And even in those old days, the triggers could not be - and have not been - recursive (means: SQL trigger executes another SQL trigger). Nowadays there are no more SQL triggers in NAV, thus this setting has zero relevance.

SQL Developers who have to create SQL triggers in that database, but “outside” the NAV application, know how to deal with that if really needed.

Auto Shrink

Let’s be frank: a NAV database is a data-cemetery. All goes in, nothing gets out. A NAV database is actually doomed to grow forever, as there are just few options (if at all) to reduce the amount of data. Hence, a NAV database needs to be configured to have a decent size, receiving all the data. While doing this a correctly set Auto Growth value is feasible. So the NAV db will grow and grow and grow … what’s the point of automatically shrinking it? That would mean: the database is idle and Auto Shrink will shrink the file. Then users start working and Auto Growth will expand it. Then shrink again. Then expand. And so on.

This  is maybe a weird disk-benchmark, but actually degrading performance by causing super-fragmentation of the file. And due to the way how Auto Shrink internally works, it will also cause super-fragmentation on indexes.

IF - for whatever reason – the whole database needs to be shrunk, THEN this is an administrative task to be done once in Management Studio.

Sometimes we need to reduce the size of the Transaction Log file (e.g. after migrations etc.) but then it is the DBCC SHRINKFILE command (again: Management Studio), not shrinking the whole database.

Recovery Model

Hence, the only setting on that Options tab which makes slightly sense is the Recovery Model. But this also could be handled in Management Studio. 

Hence ...

So to keep it simple, maybe it’s the best way to completely get rid of the Options tab.

Let's Stryke these options out, Vedbeak!

How-to: Add "Set Up Cues" to Activities
2015-3-6 16:39

So I had been upgrading a module from NAV 2013 to 2015. Selecting the module's Role Center as default and running the Windows client made me wonder what I was missing. And then I saw the void.

Shouldn't there be an action to enable me to setup cues?

What had I missed?

So I learned, looking at standard Activities pages that this needs to be added as an action:


by Luc van Vugt | with no comments
Filed under: , ,
Let's clean up NAV #7 - Unused Pages
2015-2-20 19:10

A welcome to Dynamics NAV veteran Marcel Duizendstraal, who joins the Clean Team! Geeked


It seems there are many unnecessary pages still left in NAV2015, stemming from the good old transformation time.

  • 7172 Sales Lines Subform
  • 7173 Shipment Lines Subform
  • 7174 Invoice Lines Subform
  • 7175 Credit Memo Lines Subform
  • 7176 Return Rcpt Lines Subform
  • 7182 Purchase Lines Subform
  • 7183 Receipt Lines Subform
  • 7184 Return Shipment Lines Subform
  • 7185 Purch. Invoice Lines Subform
  • 7186 Purch. Cr. Memo Lines Subform
  • 7187 Purch. Order Archived Subform
  • 7188 Sales Order Archived Subform

'Vedbaek, go ahead. Clean it out!'

Welcome to the Dynamics blog-o-sphere! #11
2015-1-31 7:34

CompGeek (Arjan van de Logt) has been around in the Dynamics world for quite some time. So like many of us he's got enough "powder to fire a gun". But as modest as he is never wanted, needed, could, ... Luckily he "finally" found a good reason to start writing: "... write about subjects I had to figure out but also about subjects I bump into and which I think might be interesting to other people."

Reading the posts, ComGeek has been writing sofar, I know I will turn to them in some near future as these typically contain info on tasks I have to do infrequently and thus will not recall all details.

Go and read and judge for yourself.

Keep it rolling CompGeek!

Page Wizard Should Populate FastTab Captions to Enable Translation
2015-1-10 13:54

Building numerous of pages I ran into this issue already ages ago. Because of that I had registered the issue on msconnect asking Microsoft to fix this.

Already on August 26, 2011 (!) Microsoft - by means of Stuart Glasson - answered that it had been fixed in NAV 7.

But NAV 2013 was released, and we know NAV 2013 R2 en NAV 2015 also were, but still the issue is there. o I have created a new entry for it and go there and give your vote.

Let's clean up NAV #6 - Remove Redundant COMMIT
2015-1-10 13:31

Browsing through msconnect I stumbled across one of my entries: Remove COMMIT from a number of Codeunits. A perfect member of my Cleanup series. Small, but as we started to "clean up" let's pick up this one too.

If you agree go there and give your vote.

by Luc van Vugt | with no comments
Filed under: , ,
Comment and Uncomment Selection – v2.0
2015-1-4 13:09

Last year was the year of (the release of) NAV 2015. A major new release bringing NAV another step forward. As before it was presented at a number of events of which I did attend a significant number. Directions US, Dutch Dynamics Community, Directions EMEA and NAV TechDays. And apart from the major part of the content they all had one striking thing in common.

Now picture yourself sitting in those rooms at these events, where various speakers are delivering their well prepared presentation. Envision what they are presenting and how the audience is reacting to that. Enthusiasm? Disappointment? Annoyance? Amazement? Or as diverse that all these emotions show up at the same time ... I recon Microsoft was quite happy with the positive (I even think enthusiastic) reception that they got for the tablet client. Surely given the effort they have put in it and the goal they want to achieve. And maybe some more other new features.

Thinking however of this one, I guess this was unexpected and ... inexpensive. If the sound level of the applause would have been measured, it by far would be number 1. And it was exactly the same on all 4 conferences. Whether Dmitry Chadayev showed it in between all the more sophisticated technical feature during the key note sessions in San Diego; or Arend-Jan Kauffmann demoed it at the Dutch Dynamic Community event in Nuland; Stuart Glasson mentioning it shortly during a O365 integration session in Poznan; or, who was it, did the same in Antwerp. In all cases the Comment and Uncomment Selection feature did rouse the audience. It surely made me laugh.

But to be honest, it also made me somewhat disappointed. As IMHO it is not complete. Surely it's great that we can (un)comment a block of code in one action and not having to use the curly brackets to do this efficiently. But I hardly uncomment blocks of code temporarily. However I do it frequently when replacing/removing existing code by new code, like in this small example:

But the Comment and Uncomment Selection feature does not support this as comment slashes are always added at the start of a line, i.e. on the first position, and not related to the indentation of the lines being commented.

So I suggest to have v2.0 for the Comment and Uncomment Selection feature by means of a setting on the Options:

Comment and Uncomment Selection – 2.0 will allow you to comment code as is now possible in NAV 2015, i.e. Comment Selection=Normal. Or (new) it will allow you to comment code in such a way that the slashes are put a the most left indentation position of the selected lines, i.e. Comment Selection=Indented.

If you agree please go to my msconnect entry and vote for it.

Comments are evil?
2015-1-4 9:23

Did you read Soren's last post? You should as it contains a worthwhile standpoint regarding commenting code. And it's down right clear that Soren abhors commenting code. Even that much that he doesn't allow me putting a comment to his post!

So here I am ending up on my own blog with a comment on comments that are considered evil. Smile

... SQUARE(Evil) ... Cool

Here I go ...

Dear Soren,

I cannot but support your standpoint. Indeed we should all write clear code that needs no comments. It makes it much easier to create, understand and maintain. The funny thing is that we - NAV developers as a group - keep on generating unreadable code; for ages already. And not only those "out in the field", also at Microsoft. Just have a look a codeunit 80. Even printing the darn OnRun code gives you a fifty pager that will keep you busy for a good number of hours to unravel. Facing that fact we could recon ourselves happy with the comment lines provided here, even if they are "evil".

So as you validly say "we should try to do better". I would have left out "try". We should do better. Simply because we will profit from it and, even more down-to-earth, because we all are paid for it. And as we both know, it's not that hard. And we are even helped with it. By the Design Patterns project. By the PRS clan. By Design Pattern videos. By Mark Brummel's posts, like this one on Natural Language Programming (which by the way also declares comments as evil).

And it's good to know that these are not voices shouting in the wilderness as people are picking this up. Standard NAV code is improving. A vast number of people are watching the videos and attending related presentations. Etc.

As said, I cannot but support your standpoint ... in principle.

Yes, I want my code to by minimal and clear. It should not do things that is not asked for. It should not have any artifacts that are redundant, unneeded, etc. And yes, a source management system like Team Foundation Server (TFS) indeed supports me (and you) in this. But ...

... I also want to do my work as efficient and effective as possible. And that's why we use comments, i.e. code markers, to our code when modifying existing code objects. Like most of us do, I know. Comparable to what we did for local features in standard NAV

This allows me, looking at the C/AL code,

... to have a quick insight in what changes have been implemented over time. True, TFS will also help me to get this insight, but not in one glance. So I need to do extra actions to get to the same point of understanding.

..., as a developer, to straight forward pinpoint the faulty code change that underlies the error when I am debugging.

..., as a tester, to determine the scope of my white-box testing. What part of the code do I need to take into account in my (new) tests.

..., as a (feature) code integrator, to perform cherry pick mergesFor this we even assured that each added field or page control will have a reference to the related TFS work item in the Description property.

I hear you thinking: "Luc, you can do better."

Maybe you're right and I am to old to change our practice. Or maybe I am just afraid of change, not daring enough. However, using these practices - our best practices, I dare to say - our work has been profiting from it, and still does.

Your fellow in TFS arms, Luc van Vugt

As Soren states he has "... heard all the arguments ..., but it doesn't change my view that COMMENTS ARE EVIL", making my exercise without any chance to change his mind, of course. Geeked

Nevertheless I just wanted to give my two cents on this even if that leaves me somewhat evil. Devil

All the Best for 2015 ...
2015-1-4 8:52

... to you all. As promising clear as the sky over our home this morning.

But what ever will happen, ...

Life's what you make it

Feliz Año Nuevo, Gelukkig Nieuwjaar, Happy New Year, Bonne Année, Godt NytårGlückliches neues Jahr, ... to all of you! And Laimīgu Jauno Gadu (for Modiris)Sretna Nova Godina (for Vjeko).

by Luc van Vugt | with no comments
Filed under:
Christmas Eve: A Joyful and Merry Xmas 2014
2014-12-24 16:08

It's fun reading old posts like last year's on Christmas Eve. Could just copy it here and let it be. However life would be utmost boring if everything would be exactly the same, but I know it would also be unbearable if everything would be totally different.

So I cherish Chrismas Eve, get the tree set and once again prepare our Kerststol. Patiently waiting for the dough to rise, meanwhile cutting wood that will heat up our oven, allowing us this evening to bake pizza's and the Stol. Allowing me to have a somewhat slower pace, still recovering from the fever I was fallen victim to last week. Long time since I had been ill. Apart from a chainsaw cut, hockey bruises and hitting a sideboard corner. Sad

A slower pace bringing about a mood of retrospect. Looking back on a fruitful year that brought me to new places. Enjoying that typically British humor with Mike, John, Sarah, Paul, Andy, Luke, Adam and Funghai during a couple of courses in Lane End, UK. Having a somewhat more quiet but still very intense week with Marko, Tadej, Dejan, Alan, Rado and Rok learning me about Slovenia, a place I had never been before. Really worthwhile.

Talking to and with many more people at Directions, San Diego, US, and Directions EMEA, Poznan, Poland. Including a whole bunch of ex-colleagues (Swabian or Microsoft) that I hadn't seen and spoken to for almost 2,5 years. And of course running into various of my MVP fellows which is worthwhile every time again.

Thanx to all of you that I was crossing 'roads' with last year. As simple or complex as it can be, it makes life what it is: worth living.

Merry Christmas ...

by Luc van Vugt | 1 comment(s)
Filed under:
How-to: Configure Visual Studio to Use an External Compare Tool
2014-12-18 17:49

During my two days NAV ALM using TFS training I got the question how I did configure my Visual Studio client to work with Araxis instead of the built-in compare tool. I easily could show them how it was configured.

Nevertheless I had to admit I didn't think up this myself. So I googled for TFS how to set Araxis as compare tool and directly did hit the blog post that helped me so much ever since I am using TFS:

diff/merge configuration in Team Foundation - common Command and Argument values by James Manning

He does not only give settings for Araxis but for many more compare tools including Beyond Compare. And ... also settings to use external tools for merging. But I never have used that as the internal tool has an important advantage over Araxis Merge: it's much easier to select/include code into the result from either source or destination.

Jet Express for Word - Some Notes
2014-11-27 17:38

Those who have been working with the Word layout Reporting feature might have heard of the Word add-in called Jet Express for Word. The essence of this add-in is that "... your fields appear in clear text and the search feature makes it quick to add the fields you need", as Jet puts it on their website.

As it's freely available (so at no cost) download it and be happy with it. However I find myself using both Jet Express for Word and the Word XML Mapping pane as the have both their pros and cons. Let me list what I think as pros and cons.


XML Mapping pane

  • When you have inserted a Content Control the focus will (still) be on the layout document, so when you use the arrows it will allows you to move inside the layout and not in the XML Mapping pane Idea
  • If your layout already contains content controls you can easily assign an item in the mapping pane by using the Map to Selected Content Control; love it Right Hug

Jet Express for Word pane

  • Adding a content control of an item in the mapping list to the layout can easily be done by double clicking on the item in the list; this is really great Yes


XML Mapping pane

  • Adding a content control of an item in the mapping list is a bit more laborious as you need to right click it and select on the context menu Insert Content Control > Plain Text; this a quite a pain in the ... Super Angry

Jet Express for Word pane

  • When you have inserted a Content Control the focus will not be on the layout document, so when you use the arrows it will move your 'cursor' to another entry in the Jet Express for Word pane; I find this very annoying Broken Heart
  • There is no Map to Selected Content Control feature here Storm
  • One major annoying thing about Jet Express for Word is that the pane will always show up when open a Word layout for editing in Word; there seems to be no way of hiding it initially Ick!

I guess it's clear there is no winner here. Hopefully either Jet or Microsoft provides us with some improvements here.

by Luc van Vugt | with no comments
Filed under: , ,
Why is the Repeater in my WORD Layout not Showing Data?
2014-11-27 15:47

Being a Word user from way back 1987 I felt immediately at home when the NAV Core Team did present us MVPs already months ago the Document Reporting feature. I think it's really a great feature. Indeed it has it's restrictions, but it's so easy to use, which is exactly the reason why it has landed in the product. Given a useful dataset definition you will have in no time created the layout. However you might run into the following as I did.

Preparing for a training on the new Document Reporting feature in NAV 2015 I was playing around with various layouts. Pimping built-in ones, using some templates from Office.com and starting from scratch. A couple of times I ran into the issue that the repeater placed on the detail lines of my layout did not show data.

And clearly I had placed a repeater on the table row following the header row of the details:

So why is the Repeater in my WORD Layout not Showing Data? To be honest I do not know. Even Reporting Torben could not tell me exactly. Nevertheless I found out how to fix it or prevent it from happening.

Make sure when inserting the repeater to have a table row above and below it (see the orange colored rows below):



Now it works and just remove the (orange colored) empty rows.

Let's clean up NAV #5 - Torn Page Detection
2014-11-18 8:23

Join the Clean Team! Geeked

Welcome to my fellow MVP Alain Krikilion, aka Kriki, who also clearly wants to clean up as you can read below. Let's kriki up NAV!

In the database properties of NAV, on the Options tab, there is the toggle Torn Page Detection.

In SQL2000 this option was introduced to have some mechanism to detect if a page was 'torn'.

What is behind it?

A page in SQL is approx. 8KB. But the default disk-cluster in Windows is 4 KB. So when you write a SQL page to disk, you write it in 2 disk-clusters. If the first cluster is written well, but the second not because of some problem, you have a torn-page.

In a later version of SQL Server, the Checksum was introduced. SQL Server calculates this checksum, when a SQL-page is written to disk, and writes it together with the data in the page. Now when SQL server reads that page, it calculates the checksum and confronts it with the checksum found in the page. If they differ, SQL knows the page is corrupt.

In the beginning, it was feared that it could have a performance impact, but that proved to be wrong (luckily). So the default has become Checksum and you don't need the possibility in NAV to change that as there is no reason to do it!

So lets get rid of Torn Page Detection.

Let's clean up NAV #4 - SYSTEM Functions
2014-11-16 15:51

Once I start to clean up ... I can't stop I guess. So here's more that still resides in C/SIDE and has become totally obsolete (the following table is an excerpt from Changes in C/AL Behavior and Support from Earlier Versions of Microsoft Dynamics NAV):




Not supported in Microsoft Dynamics NAV 2015.


Not supported in Microsoft Dynamics NAV 2015.


Not supported in Microsoft Dynamics NAV 2015. Use the finsql.exe executable with the ExportObjects command instead. For more information, see ExportObjects.


Not supported in Microsoft Dynamics NAV 2015. Use the finsql.exe executable with the ImportObjects command instead. For more information, see ImportObjects.


Obsolete in Microsoft Dynamics NAV 2015, but still supported. This function always returns true.


Not supported in Microsoft Dynamics NAV 2015.


Not supported in Microsoft Dynamics NAV 2015.


Not supported in Microsoft Dynamics NAV 2015.


Not supported in Microsoft Dynamics NAV 2015.


Not supported on Microsoft Dynamics NAV Server.

So if it is not supported why still have it? Let's clean up the ... Geeked

More Posts Next page »

Recent Posts


Email Notifications

This Blog


Favorite BLOGS


Team Foundation Server BLOGS