by Vjekoslav Babic on May 17, 2012
.NET Framework is full of programming conceptual gems, that are now at the fingertips of us poor C/AL folks. One of those is generics. However, the C/AL support for generics at the first glance seems rather limited, and the help file says that you can’t specify data types, and that all generics will be instantiated with System.Object as their type.
However, with Microsoft Dynamics NAV 2013, there is a very simple way which allows you to use generics with other data types, as well. So, if .NET Framework Interoperability interests you a slightest bit, here’s a solution.
The example below will be for the System.Collections.Generic.Dictionary<,>, and I will show how to use instances of the Dictionary<,> object with any desired data type, without having to pull in any external assemblies.
[click to continue reading…]
by Vjekoslav Babic on February 22, 2012
Passing strongly-typed data to NAV Web services can be trickier than it seems. If you are lucky, you can make your method accept strongly-typed parameters, and you are good to go. However, if you just can’t avoid sending text data, your text must be encoded in EN-US format, otherwise it will cause problems (see this).
What the heck, just encode the data as EN-US, right? Not quite. There are a myriad of reasons why data can come in non-EN-US encoding, one of which is this: it’s the Web services, for Pete’s sake – anyone or anything can call them.
[click to continue reading…]
by Vjekoslav Babic on September 30, 2011

If there wasn’t one already, someone should have invented Belgium. There are two things in this world that I love, and probably shouldn’t (and an oversized red speaker’s shirt I got from Luc today did a darned god job at concealing the unlucky consequences of overly indulging in both of them): beer and chocolate. Boy, do Belgians know their beer and chocolate!
But they know their NAV, too, and after NAV TechDays 2011, which have just ended in Antwerp, and two days of top NAV content, I can only say – great job, Luc and the team, and please make it a tradition.
If you attended my presentation about .NET interoperability, then there are a couple of demos I couldn’t deliver due to time constraints, and I promised to blog it. So, here we go.
It’s about streams. You already know that in NAV there are two data types, InStream and OutStream, that allow you to stream data in and out of generic sources or destinations. They are a fantastic tool, because they require you to know nothing about the type of source or destination, and you can store and retrieve data without having to care if the data comes from Internet, or a BLOB field, or is it written to a file, or transported over an XMLport. Stream makes it abstract and allows you to simply handle the data, and make the object itself care about the specifics.
[click to continue reading…]
by Vjekoslav Babic on March 6, 2009

Last week I delivered the C/SIDE Development course for partner community in Zagreb. As always, questions abound afterwards. Today, I’ve got a question from an attendee: “What’s the best way to print a report in multiple languages?”.
Up front: this is NOT a technical post. It IS about technical solution, but it is primarily about design, usability, standards and best practices. I’ll plain ignore the fact that it does use a few C/SIDE or C/AL references, so please, do likewise 
(I said this because I kind of swore not to C/AL around this blog anymore, but again – sometimes I just have to do it.)
[click to continue reading…]
by Vjekoslav Babic on November 11, 2008
Last Friday, while enjoying a not-at-all healthy Salisbury steak with cheese, I had an interesting discussion with a partner: should NAV consultancies create default databases?
A default database (in this context) is a packaged solution built upon standard Microsoft Dynamics NAV, where a consultancy has introduced a number of features that they sell to all their customers as the standard solution, instead of standard NAV. The modifications to standard NAV can range from simple report adornments to minor feature improvements to full-scale horizontal or vertical functionalities.
[click to continue reading…]