Last month in NAV blogs

Spring has come. You can tell it. Okay, to be totally honest, nature and weather, at least over here at my place, haven’t done their part (yet), but NAV blogs have for sure made up for that. A lot of dormant blogs have awaken, some have erupted, and there were a lot of good stuff to read from my fellow NAV bloggers in March 2009.

As always, there is no particular order to this NAV blogosphere review, and I’ll just randomly report about what I found interesting.

Microsoft Dynamics CEE Blog has reported about MicroSource portal, a project from a Czech company, with a simple mission: “optimize effectively the use of partner resources”. If a partner company has available resources but no work, they can share them through this portal with those partner that has work but no resources. In the times of economic downturn, this initiative can keep work balanced, partners in business, and customers happy. Kudos to the idea, and good luck!

NAV Reporting blog has broken an almost two months long silence with couple of useful posts about reporting through RDLC in NAV 2009, one about creating dashboards in NAV 2009 and another showcasing four more demo reports. The greatest thing is that the blog doesn’t just show off some nice functionality, but also makes all these reports available for download.

Waldo has been particularly active in March. He started with an update to his fantastic Platform updates overview – 3.70B – NAV2009 RTM resource list. It includes all the info you need about changes and development in NAV since version 3.70B. The list is nicely structured and organized, provides hyperlinks to (almost ;-)) all useful resources you need (it doesn’t link to my blog, but I’ll forgive Waldo, he reviewed my book so I’ll let him get away with this :-)) and I highly recommend you to go and check it out, it might help you more than once.

If you didn’t have a chance to attend Convergence New Orleans, you can get a gist of what it was like by reading Waldo’s Convergence Diary series of blog posts. Start here, with the introduction post, but be prepared to spend quite some time, because his series of seven posts will catch your attention and keep it. It make me long for the deceased Convergence EMEA, and I hope it was cancelled only temporarily.

If like geography, you’ll definitely want to visit Freddys Blog, where Freddy published a series of blog posts about mapping and Virtual Earth integration in Microsoft Dynamics NAV 2009. There is a lot of code and walkthrough there, so be prepared for a lot of copy/paste. Integration with mapping software is not just a eye-candy feature to make the audience drool and ooh and aah at presentations; there are tons of scenarios and practical situations when having features such as these comes handy. Go, and check it out, I highly recommend it.

One of the comeback blogs in March is Alex Chow’s Confessions of a Microsoft Dynamics NAV Consultant. Alex has posted an interesting (and very useful!) post about how to correctly set up Microsoft Dynamics NAV Account Schedules feature to calculate COGS. Even if you are not interesting in this particular feature, it might pay off to check it out, if for nothing, then for a quick costing refresher.

I’ll conclude last month’s blogs review with redelivering a complete blog post from Plataan, where Vincent Bellefroid explained through a short joke why training is so important:

A CEO was debating a training initiative for his company, someone asked him:

When comparing .NET variables, including Enums, you cannot use C/AL comparison operators. To compare .NET variables, you must use the Equals method (of the System.Object type) that all .NET types implement or inherit. So, instead of IF var1 = var2, or IF var1 = var1.EnumValue (in case of an Enum), just write IF var1.Equals(var2), or IF var1.Equals(var1.EnumValue).

I see this mistake often being made or attempted by developers, even though it has been documented inside .NET Interoperability documentation since it was introduced with 2009 R2.

Related

Make sure that you don’t access the Microsoft.Dynamics.NAV JavaScript object before the document ready event fires. If you do so, you might experience problems on Chrome when the user refreshes the browser (F5). It appears that on refresh Chrome loads (and runs) scripts in different order, and depending on how complex scripts included in your project are, your code might get executed before Microsoft’s script is loaded, and it will cause nasty script errors. This occurs only on Chrome on PC.

Related

When you have to format C/AL variables (numbers, dates/times, booleans) for exchange with other apps, call FORMAT(variable,0,9) instead of simply FORMAT(variable). The format 9 formats the variable according to XML standards, and this value can then be interpreted correctly on any system with any regional settings. This is useful also when passing string-formatted values from C/AL to C# or JavaScript.

Related

To check if a BLOB field has a value, you call its HASVALUE function. For example: IF Item.Picture.HASVALUE THEN;

In older versions, earlier than NAV 2009, you had to call CALCFIELDS before you could check HASVALUE, which – if you think of it, did not make much sense. This was changed in NAV 2009, so ever since that version you can check HASVALUE before you decide to call CALCFIELDS first. It makes all the sense – you don’t need to pull up to 2GB of data over just to see if anything is inside.

If you are an old-school guy (or just old, as me), and you CALCFIELDS first, HASVALUE next, maybe it’s time for you to reconsider it.

Rembember – the pattern is: IF Field.HASVALUE THEN Rec.CALCFIELDS(Field);