Saturday, 11 July 2009

Goodbye World

After 2 and bit years, it's time to say goodbye to Gaspode's Brain Dump. I'm not going to stop blogging (you can't get rid of me that easily). Instead I will be moving my blogging to the site I created to support my book
Thank you to everyone that has kept reading this site and has kept me blogging here over the years. I am hoping you will re-direct your feeds and favourites to the new site.
So why, you may ask, am I moving the blog. Well the thing is, I find the blogger blog editor a real pain to use. Uploading images is really too hard and I find myself having to write the post in HTML because I just can't get the layout right. With the new site, I am able to use Microsoft Live Writer to write my posts off line and can then simply post when I have finished. I can also re-post to my blog on with just a couple of button clicks.
Since the new site is using Community Server, I am able to add Wikis, downloads and all sorts of other stuff.
Goodbye and hopefully, you'll follow my NAV exploits on

Monday, 1 June 2009

Help is on the way

I finally got chance to finish reading through the Microsoft Dynamics NAV Statement of Direction I blogged about last week in my post on the NAV 2009 service pack 1. There’s a lot of marketing waffle in there, as you would expect, but also quite a few interesting things to look forward to.

The online help in NAV is something I am quite passionate about, and have looked forward to the day when help can be easily modified. This section from the statement of direction caught my eye:

“We will reduce the cost to implement custom Help by eliminating CHMs as the delivery format for Help. We will provide mechanisms for partners to extend Microsoft Dynamics NAV Help at a low cost, by integrating Help authoring into the Microsoft Dynamics NAV development process, and by using Microsoft Word, HTML, and Microsoft SharePoint. We will make it easy to extend Help with content on a partner Website.”

Now that sounds pretty exciting. Editing help in Word? Deploying via SharePoint? Cool!

Tuesday, 26 May 2009

The Amazing World of Blogging

I got a comment on a blog post tonight. That's pretty rare. But what's truly amazing is that the blog post was made in April 2007 -- over 2 years ago! It was my third ever blog post.

I guess this just emphasises that you never know who is reading what you write. Thank you to that annonymous commenter from Poland that decided to share their thoughts on that post. It really made my day.

The blog post was

Sunday, 24 May 2009

Dynamics NAV 2009 SP1 Preview

I love the Microsoft Dynamics NAV 2009 RoleTailored client (RTC) but there are those that are less enamoured with it. Some experienced NAV consultants, for instance, find it difficult to use because some of the most useful features of the old system were not implemented in the RTC. Thankfully the first NAV 2009 service pack (SP1) is on the horizon and, amongst other things, this service pack will re-introduce some of the functionality that we have so far struggled without.

The recently released Statement of Direction contains details of what to expect in this service pack.

"Microsoft Dynamics NAV 2009 Service Pack 1 (SP1) builds on all the innovations that were introduced with Microsoft Dynamics NAV 2009. With Microsoft Dynamics NAV 2009 SP1 we are continuing to improve productivity for customers and partners. We want to ensure an easier upgrade to the new RoleTailored user experience for Microsoft Dynamics NAV customers working on previous versions of Microsoft Dynamics NAV as well as adding the innovative Client Extensibility for both existing and new customers."

As an MVP I was fortunate enough to get my hands on the first community technology preview (CTP1) of SP1 and I like what I've seen. The statement of direction promises a release date of Q3 2009. If the guys at Microsoft are consistent with their previous release approach, we should be seeing a public beta made available to all partners in the next month or so. That would be great news; there are many partners that want to see what is coming as soon as possible and making beta and CTP releases available to partners is a smart move that can only help to ensure a higher quality in the final release.

The RoleTailored client has been with us for a while now and if I had to pick a “killer feature”, it would have to be the ability to personalise the application. The personalisation features in NAV 2009 RTC are pretty stunning and allow end users an unprecedented ability to fiddle: hiding fields, showing fields, promoting actions, adding reports, adding charts, and many more possibilities. You could spend more time making the system look "just right", rather than getting on with the more boring aspects of using the system (like doing your work). But what about SP1, are there any killer features in this release? Hell yes!

Page Search

The RoleTailored client allows the features that are needed for a specific role to be made readily available to the end user, but what about those features that are used less frequently? For those, you need to enter the "Departments Place": a labyrinth of options, links, groups and submenus. The first page of the Departments Place should have the text " Abandon hope all ye who enter here" in fiery letters across the top of the screen. I am convinced that there is a clever algorithm that will move options to a new location if you are finding them too easily. For me, SP1 is going to make the Departments Place a place I never go to, because I will be able to search for the pages I want to run and let the system do the work for me.

In January I started to work on a menu search feature that I have long desired in NAV and I made a couple of blog posts on my progress. Then I heard that this feature was to be included in SP1 and so I decided to wait. The new feature is superb. Let's say I want to find the Business Units

I can type into the search pages box at the top right and as I type, options are displayed in a drop down results list. As you can see here, the Business Units is found and I can either click on the left to open the list place, or click on the right to open the departments page that contains the option. This feature is worth SP1 on its own. In fact, I think this feature is reason enough to upgrade to NAV 2009.

Saved Views

Next on my list of goodies, is this save view feature. The Role Centre is the home page for NAV 2009 users in the RTC and in the home pane on the left, you can see filtered views of entities. This include such things as Sales Orders that open, ready to ship, delayed, and so on. Now the end users can create their own filtered lists by simply clicking the Sorting and Filtering activity button and selecting the “Save View As” option. Nice!

The result is a new filtered list in the navigation pane. Previously it was only possible to create these filtered views through programming.

Other Stuff

There are many other things promised, not all of which were available in CTP1. You can read the statement of direction if you want to know all of the new features and there are lots, but you will be pleased to know that we can expect those missing data entry features such as in-cell calculator, copy previous value, copy cell value, filter on current field, next record and previous record on task pages. In addition we are promised improved Matrix Pages and the good old Zoom feature is back.

I've always been one of those people that looks forward to what’s coming next and as a result I sometimes forget how good the NAV 2009 release is. Now I'm going to go back to the statement of direction and drool over the promised features in NAV "7".

Wednesday, 13 May 2009

Spot the Difference

OK – can anyone tell me what’s unusual about this image?

Sunday, 3 May 2009

Differences between RTC and Classic Client

Probably the biggest headache when developing for Microsoft Dynamics NAV 2009 is when you find different behaviour between the same code executing in different clients. I have experienced this twice so far and both times took a little sorting out.

The first issue was when I tried to import a FOB file that referenced a DLL. The DLL had not been registered on the machine on which I made the import and, prior to NAV 2009, this was not a problem. If you did not have a particular DLL, you would not receive an error until you tried to access the DLL at run time or tried to recompile the object. The FOB files are shipped pre-compiled so there was no need to have the DLL registered on machine just to be able to import the objects.

What I found in NAV 2009 was that although the object imported without errors, an additional message reported that there were problems with one of the objects (can't remember the exact message) but basically what was happening was that once the objects had been imported, the system was attempting to create the C# code to be used by the Service Tier. Since the DLL being referenced could not be found, the C# code did not get created. As a result, when a part of the system tried to access some code in the Codeunit, a run time error occurred – but only on the RoleTailored client (since it relies upon the C# version of the code) the Classic client worked fine. As a solution, we made a point of ensuring that any DLLs required by the system were registered on a computer that was to be used for importing FOBs.

The second problem I came across was as a result of a slight difference in the handling of Option type fields. In the Classic client, if you were to delete the contents of an option field on a form (thus making it an empty string), the system would insert the first option value. Often the first option value is a single space. If you were to do the same on the RoleTailored client, you would get an error message telling you that blank is not a valid option and you would be reminded what the valid options were. This can be quite confusing and you need to remember to type a single space in order to "blank" the field. I've learnt to live with this, but at the end of the week I discovered that this problem can be quite confusing when you hit it from code. One of the programming samples in our book that we provided for download was the ability to use the Data Migration tool to import Dimensions as well data. This has proved quite useful, but I found that when I was extending the tool to work with Document Dimensions (so I could import documents and not just master data) was getting a strange error that I did not get in the classic client. The problem was that I had some code that was trying to pull an option value from an XML document and it was getting an empty string, since the node could not be found. You can probably guess where this is going. The evaluation of the empty string resulted in perfect execution in the classic client but a run time error in the RoleTailored client telling me that the option was not valid. Since this problem only occurred on the RoleTailored client, I was forced to try out the debugging on the service tier (I followed the instruction Vjeko wrote in our book) and it helped me to track down exactly what was going on. It was then fairly straight forward to only evaluate the field value if the text from the XML node actually contained a value. I quite enjoyed debugging in Visual Studio. It was nice to have a debugger that allowed me to step into, over and out of code, as well as being reliable and predictable.

Friday, 24 April 2009

NAV 2009 Performance Guide is here

The long awaited NAV 2009 Performance Guide is here. You can download it from the site.

You should download the document and read it to draw your own conclusions from the tests that were performed. I found the forty-page document quite heavy going with a lot of technical results (that I didn't fully understand) and some limited conclusions of the analysis. I did find the summaries useful, it's just that I could have used more summary and less data.

One interesting conclusion, for me, was that a single NAV Server appears to be able to comfortably handle 50 concurrent users. This was based upon the NAV Server application, being a 32-bit application that can work with 3GB of RAM or less, showing a 1.7GB memory consumption for 50 concurrent users. Obviously this is dependent on the type of hardware you are using and the scenarios your users are likely to be running. The document contains sufficient disclaimers on the findings so, as is often the nature of benchmarking results, this information is more of a guideline than a rule.

With respect to virtualisation, the team do not recommend using a Hyper-V virtualised environment for production use due to the reduced performance.

Personally I found that this document fell short of my expectations. It is clear that the team have put a lot of effort into their studies; however, I would like to see a guide to sizing hardware that is easy to use and understand. It would be nice if we could have some recommendations that answer the following questions:

  • What is the maximum number of users?
  • At what point should I separate the tiers on to three machines over two?
  • How many users should I be running per NAV Server?

I would also like to see the scenarios run in the Classic architecture to see what performance benefits we get from the three-tier architecture.

Saturday, 18 April 2009

My New Toy - Sony PRS-505

I’ve tried to read electronic books (ebooks) in the past but have always preferred paper books (pbooks). As my good friend Vjeko said, “I like reading lying down - and I most certainly don't like the feel of laptop lid hitting my forehead when I fall asleep :-)”

Having said all of that, I have bought a new toy that has changed my reading world and has convinced me that, whilst the pbook will probably never die out completely, the age of the ebook seems to almost upon us. The new generation of readers are become cheaper and more accessible and more and more publishers are getting their books out in ebook formats.

There are a lot of reading devices available, and if you’re interested in learning about them, I can recommend the forum I spent a while looking at the various devices on this site before a forum member offered to sell me a Sony PRS-505 second hand. I have now had the device for nearly two weeks and have finished reading “Simple Genius” by David Baldacci. David’s book is great and I really enjoyed it – he certainly is a very talented author, however I enjoyed reading the book even more because I was reading on my new reader.

If you’ve read ebooks on a phone or PDA or laptop, you’ll know that it can be a frustrating experience. The back-light on these devices can make your eyes tired. Laptops have a tendency to get hot and take a while to boot – not to mention the rate they chew through batteries. The Sony PRS-505 on the other hand does not use a traditional LCD display but instead using a technology called e-ink that has a similar effect to reading a glossy magazine it only uses power to change a page which means you will be able to read for hours and hours on a single charge. The internal storage and memory cards mean you can carry hundreds of books with you.

Incidentally, you can buy a PDF format e-book version of Implementing Microsoft Dynamics NAV 2009 from the PACKT web site. I’m looking forward to future devices that promise larger displays (good for reading A4 PDF documents) such as the Plastic Logic Reader, but for now, I’m really pleased with my new toy.

Sunday, 15 March 2009

’sup dog?

Well, it’s been a while since I last posted. I’ve been working on a new NAV 2009 implementation which has been keeping me very busy. I’ve battled with Kerberos delegation on a three-tiered architecture. I’ve got to grips with the form transformation tool and the transformation of MenuSuites. It’s been really good fun and I’ll share some of what I’ve learnt in some later posts. I definitely want to make a post on the Kerberos stuff because I really battled with it – but for now, you can be assured that the Installation guide on MSDN is right and although it seems a bit weird what you need to go through, it does work.

The Implementing Microsoft Dynamics NAV 2009 book seems to be doing well and I’ve finished reading it – am I the first person to read this? There are no reviews out there yet and I can’t really review my own book can I? It’s really quite good and I’m very pleased with the end result. I’m now working on getting a decent site up and running so we can put up the downloads and links and maybe get a bit of discussion going around the topics we touched on in the book. We’ve put something up there that looks pretty and re-directs to other sites, but I want to make a mini-forum based on Community Server.

This weekend I’ve installed two pieces of software from two companies that are often portrayed as arch-enemies: Microsoft and Apple. On the Microsoft front I installed the new Windows Live tools including Windows Live Writer that I think has to be the best blogging tool I have ever come across. I’m very impressed where things are going with Microsoft and the quality of their software really blows my socks off. Windows 7 looks good, IE8 looks good. The Live services are getting to be pretty awesome.

And then on to Apple. Grrrr! I didn’t want to upgrade my iTunes, but it seemed to install some kind of Genius thing that seemed to corrupt my library and made the app hang. So I figured I’ll load the latest upgrade. An 81MB download and reboot later and the application runs at least, but where are my podcasts? All of my podcast subscriptions are gone. Apple make really nice hardware but I don’t know why people rave about their software. It does nothing for me.

Saturday, 31 January 2009

Object Designer in RoleTailored Client

Here’s a bit of fun for anyone that wants to play around with development in the new Virtual PC image for NAV 2009. I’ll take you through building an Object Designer page in the RoleTailored client. Obviously there are some things you won’t be able to do (like actually design objects) but you will find it useful – I have done – and it’s a good exercise to follow. Here’s an example of the end result.

As you may know, you can run pages (and some other objects) in the RoleTailored client by using a hyperlink command entered into your browser address bar. The thing is, I often can’t remember the syntax, and need to open my book (because I know I wrote the details there). You could also find the answer by searching the online help or searching blog posts. The syntax I use is: dynamicsnav:////runpage?page=358 as this will launch the page in my default company. Typically, I want to create a quick page or try something out without going to the trouble of adding the object to the MenuSuite, then finding it in the Departments Page and running it, so I use this hyperlink command. It works OK, but I figured it would be good to have a list place of objects that I could use in the RoleTailored client to run any page.
For a start, we’re going to need an Object Designer page. This exercise is based on the new virtual PC image for NAV 2009 – (you’re going to need a Developer’s License installed before you can do this exercise).

1) Launch the Classic Client with SQL Server and make sure you are running with a Developer’s license.

2) Run the Object Designer (Shift+F12), click the Page button to work with Pages in the Designer and click the New button to create a new Page.

3) In the New Page window enter Object in the Table field and select the option create a blank page of type List. Click OK.

4) In the Page Designer, you have a blank line. The top line needs to be a ContentArea Container, and the quickest way to get one in there is to put something in the Caption field, move off the line and then move back on to it and delete the contents of the Caption field.

5) Now on the next line down, create a record of type Group and SubType Repeater. This is how we get a table type control in a list. Move down to the next blank line. Your page should look like this.

6) Now click on the Field Menu button from the toolbar or select View | Field Menu from the menu bar.

7) Highlight each of the lines except the BLOB field. Then click back on to the Page Designer. It’s not a drag-and-drop, but more like a click-and-click.

8) The system will ask if you want to add the selected fields to the page. Select Yes while mumbling “duh?” to yourself. Your page should look something like this.

9) Now would be a good time to save your work. Hit Ctrl+S and enter Object ID 60000 and call it Object Designer. If you didn’t load your developer’s license on the Virtual PC image, you’re going to be pretty grumpy now.

10) I don’t want all of those fields to be immediately visible, but it’s nice to have them on the Page just in case I want to use them but we can hide them by setting the Visible property. For example, with your cursor on the Company Name field, press Shift+F4 to bring up the properties and set the Visible property to FALSE.

11) Change the Visible property to FALSE for DBM Table No. and Caption too. Save your changes again with Ctrl+S.

12) Now we want to add the ability to run our objects so we need an Action on the page. Move your cursor on the Page Designer so that it is on a blank line and select Actions from the View menu (if you are on a blank line this will give you Actions for the Page which is what we want).

13) Create a new ActionContainer with a SubType of ActionItems and then on the next line create an Action of type Action with a Caption of Run. We want to set some properties on this Action so that it will appear in our Action Pane when we run the Page.

14) Set the Image property to Start (that’s the name of the image), Promoted to Yes, and PromotedIsBig to Yes. I also set the PromotedCategory to Process.

You could try running our new page now with dynamicsnav:////runpage?page=60000 but you will discover that our Action Button does not appear. This is because we don’t have any code or properties against the button that will do anything. We also want to filter our records so we only see objects with a Type greater than 0. Let’s continue where we left off. First of all we’ll filter the records to only show a limited range of object type.

15) We need to set the SourceTableView property for the Page, so with a blank line on the Page Designer selected, press Shift+F4 to bring up the Page Properties.

16) Type WHERE(Type=FILTER(>TableData)) into the SourceTableView field (you can use the assist edit buttons to figure out this value if you wish, or you can just type it straight in to the field).

17) Close the Properties window and with the blank line still selected, bring up our Actions once more. This time, press F9 on our new Action when it appears to bring up the C/AL Editor window.

18) Enter the following Code.

19) Save everything with Ctrl+S and try to run our Page with dynamicsnav:////runpage?page=60000. Bingo. If everything worked OK, you should have something like this.

Nearly there. Just one tiny change to make. I’d like my new list to be available as a List Place in my Role Center, so I’m going to modify the default Role Center (on the Virtual PC image) which is Page 9018.

20) Edit page 9018 and with a blank line selected, bring up the Actions window to show the Actions for the Page.

21) Insert a new Action in the HomeItems Action Container. Type must be Action and set the Caption to Object Designer.

22) Finally, set the RunObject property for the Action to Page 60000, the system will translate that to Page Object Designer as you move off the field (assuming you have followed these instructions).

23) Save everything and restart the RoleTailored client (unfortunately the Refresh button doesn’t re-read the Role Center so we need to re-open the RoleTailored client).

24) That’s it. Our very own RoleTailored Object Designer. Well Object Runner really, but hopefully you learnt a few things along the way.

If you want the tool but not the learning experience, you can download the objects from DUG. As a matter of interest, you can use Mark Brummel’s discovery about running the Classic client reports from the RoleTailored client to run Forms as well. Maybe I’ll post that another day.

Sunday, 18 January 2009

Where is that MenuSuite option in NAV 2009? Part 2.

In my first post on the MenuSuite search, I discovered that in NAV 2009 we can get at the MenuSuite through a blob field on the Object Metadata table.

In this post, I'll go one step further to see if we can start to do something with the blob.

The first thing I wanted to know is: do I need to worry about merging the various MenuSuites? When the MenuSuite is exported as text it contains only the differences that should be applied to the previous MenuSuite. For example 1080 (Partner Level) stores the differences that need to be applied to 1020 (Regional level) which in turn stores the differences that need to be applied to 1010 (Dept – MBS level).

I used a text comparison tool to compare my 1080 XML export to my 1020 XML and I can see that the 1080 is the full combined MenuSuite – perfect! This means I don’t have to worry about merging these files together. If I search for the items I want in the MenuSuite with the highest number, I will be looking at the correct menu structure.

Next I need to know what I am looking for in the XML file. If I take a look through the 1080 file, I can see we are looking for an Actions node with an xsi:type attribute of “ActionDefinition”. This will give me the node that is going to run an option. Within this node I can see there is a CaptionML attribute that I can search to try and match the string I am looking for.

My next programming task is to see if I can get the XML document loaded into an XMLDOM automation control inside NAV. Once again, this was a lot easier than I thought it was going to be. I'm not doing much with the XMLDOM, simply loading it and then saving it again so I can check everythig is working. Here's the code:
OBJECT Codeunit 91360 Export MenuSuite Objects
Version List=;
l_ObjectMetadata@1000000004 : Record 2000000071;
l_XMLDoc@1000000000 : Automation "{F5078F18-C551-11D3-89B9-0000F81FE221} 4.0:{F6D90F11-9C73-11D3-B32E-00C04F990BB4}:'Microsoft XML, v4.0'.DOMDocument";
l_InStream@1000000001 : InStream;
// MenuSuite items in the RoleTailored client are stored in the range 1000..1999
// They map to the Classic client numbers but with 1000 added to the number.


l_ObjectMetadata.SETRANGE("Object Type", l_ObjectMetadata."Object Type"::MenuSuite);
l_ObjectMetadata.SETRANGE("Object ID", 1000, 1999);

// The XML document for the highest number contains all nodes not just the changes.
// so we only need to do a FINDLAST
ERROR('Something went wrong. There was no Object Metadata for the RoleTailored MenuSuites.\'+
'This sample only works with NAV 2009.');




// Just to check to see if I have my XMLDoc loaded correctly, I'm going to save it and
// then open it in my browser.'XMLDOM_%1.xml',l_ObjectMetadata."Object ID"));



Tuesday, 13 January 2009

Where is that menu option in NAV 2009?

Ever since the Outlook-style menu was added to Dynamics NAV, I have struggled to find the options I want. Eventually I got used to where things were in the standard system but as soon as the end users or over-zealous consultants made modifications to the MenuSuite objects, I found I was lost once again.

So what is the solution? Obviously I needed a tool to help me find the option I was looking for. In my dream world, I could type "Payment" into a search box and have the following results presented to me:

Financial Management | Cash Management | Payment Journals
Financial Management | Payables | Payment Journals
Financial Management | Receivables | Documents | Customer Payment
Financial Management | Receivables | Setup | Customer Payment

It would be really nice to then be able to click a button to launch the option and hopefully, by seeing where the option is, commit to memory where the item can be found.

Previously building a solution such as this was too hard (for me). This was mainly due to the export formats available to version prior to NAV 2009. You could sort of do this by exporting the MenuSuite objects as text and then write a program to read the text file and use this information to build the menu paths. I didn’t really want to have to figure out the file format of the MenuSuite export, and I didn’t really want to have to write the program to read it in. It never seemed quite worth the effort.

NAV 2009 has changed things and I thought that the ability to export objects as XML would make this task a lot easier. Unfortunately when I tried to export a MenuSuite in XML format, all I got was an empty XML file – not what I was hoping for. Back to the drawing board!

Then, when I was creating some programming samples for my book on Implementing Microsoft Dynamics NAV 2009 (buy it from amazon here), I discovered that the Object Metadata table has a blob field called Metadata that, for MenuSuite objects, contains the MenuSuite in XML format. How cool is that? Not only can I get the data in an easily-accessible format, but I can also do it programmatically by handling the XML document in the blob field.

If you wanted to see the contents of your MenuSuites in NAV 2009 as XML files, you could run the following Codeunit. Now I have the basic tools for the job, I can create a Page in NAV 2009 that will (hopefully) meet my requirements. I will, of course, post the progress here. Stay tuned.

Here's the Codeunit...
OBJECT Codeunit 91360 Export MenuSuite Objects
Version List=;
l_ObjectMetadata@1000000004 : Record 2000000071;
// MenuSuite items in the RoleTailored client are stored in the range 1000..1999
// They map to the Classic client numbers but with 1000 added to the number.

l_ObjectMetadata.SETRANGE("Object Type", l_ObjectMetadata."Object Type"::MenuSuite);
l_ObjectMetadata.SETRANGE("Object ID", 1000, 1999);

IF NOT l_ObjectMetadata.FINDSET THEN
ERROR('Something went wrong. There was no Object Metadata for the RoleTailored MenuSuites.\'+
'This sample only works with NAV 2009.');

l_ObjectMetadata.Metadata.EXPORT(TEMPORARYPATH+STRSUBSTNO('Metadata_%1.xml',l_ObjectMetadata."Object ID"));
HYPERLINK(TEMPORARYPATH+STRSUBSTNO('Metadata_%1.xml',l_ObjectMetadata."Object ID"));
UNTIL l_ObjectMetadata.NEXT = 0;