Generics in .NET Interop for NAV 2013

by Vjekoslav Babic on May 17, 2012

image.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…]

{ 1 comment }

Hello, unicode!

by Vjekoslav Babic on May 17, 2012

image你好,世界!გამარჯობა, მსოფლიო! હેલો, વિશ્વ! مرحبا، العالم! שלום, עולם! नमस्ते, दुनिया! こんにちは世界 ಹಲೋ, ವಿಶ್ವದ! 안녕하세요, 세계! Γεια σου, κόσμε! Привет, мир! வணக்கம், உலக! హలో, ప్రపంచం! สวัสดีโลก!

No, no, I didn’t go fully crazy yet, but I’m surely closing in. Maybe it’s not at all such a big deal as I see it, but the new Unicode support in Microsoft Dynamics NAV 2013 is just blowing my socks off. After a quarter century of being tied to a single code page of choice, NAV has finally been freed of it’s single byte per character legacy.

[click to continue reading…]

{ 3 comments }

Microsoft Dynamics NAV 2013 Beta Available!

by Vjekoslav Babic on May 14, 2012

BetaI don’t know about you, but I think today is a great day: Microsoft Dynamics NAV 2013 Beta has been published on PartnerSource, and if you have access, you can download it from here.

I’ve been playing around with CTPs for more quite a while, and even though I can’t share any specifics, I can assure you: this is definitely the best release ever, technically, architecturally, functionally and from business value perspective. Whatever angle you take – this release is massive.

I believe I don’t exaggerate if I say that 2013 brings more news in comparison with 2009 R2, than 2009 brought in comparison with 5.0 SP1.

If you want to check more about what exactly is new, I suggest you read the white paper and accompanying documentation at the NAV 2013 launch portal, and I hope the MVPs soon get the clearance to blog about specific features. There are just so many fantastically exciting to-dos for this blog, about NAV 2013, that I’ll probably eat my fingernails – heck, the whole fingers! – in anticipation to be able to start.

{ 5 comments }

Dynamics Top 100 Nominations for 2012

by Vjekoslav Babic on March 3, 2012

DynamicsWorldIt’s the fourth year of DynamicsWorld’s Microsoft Dynamics Most Influential People Top 100 list, and it’s the nomination time. Last year I’ve somehow found my way onto this list (and I certainly didn’t nominate myself), and it seems somebody has nominated me this year too (and again, it wasn’t me).

Now, I don’t want to influence you to put me on this list in 2012 again, but if you think I deserve it, I’d appreciate if you took time and voted for me. You can do it by sending an e-mail to top100@dynamicsworld.co.uk, tweeting my name with #dwtop100 hash-tag, commenting on Facebook, or posting on LinkedIn. Or you can do all of the above Smile

Even though there is a lot of criticism of this list, it is still an indicator of person’s standing in the Dynamics community. I’ve heard people say “I don’t have a clue who this or that" is” on the list, but that’s hardly a valid argument. The list doesn’t differentiate between CRM or ERP, let alone between different flavors of ERP, so of course not everybody will know everybody, and I also don’t have a clue who half of the list is, but still I bet they deserved to get there.

So, show me your support for my blog and my work in the Dynamics community by voting for me! Thanks in advance!

{ 2 comments }

Passing strongly-typed data to Web services

by Vjekoslav Babic on February 22, 2012

imagePassing 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…]

{ 4 comments }

Microsoft Dynamics Mayhem

February 16, 2012

If you thought “here he comes again” with the bugs and stuff, no – this is not about it. This is just about a new sales campaign launched by PACKT Publishing, the good guys who published my and Dave’s book three years ago, and plenty other good books thereafter, as well. So, if you haven’t [...]

[click to continue reading…]

Web Reference vs. Service Reference, Part 3

January 31, 2012

Fasten your seatbelts, you are in for the next round of Web Reference vs. Service Reference, which brings an unexpected twist to the story. After giving reasons why not to use Web References, I’ll now put my devil’s advocate’s hat on, and try to have you change your mind. It’s simple: there are situations where [...]

[click to continue reading…]

Web Reference vs. Service Reference, Part 2

January 30, 2012

A beauty of Web services is that they don’t need to care at all about who’s consuming them. Whether there is .NET on Windows, Java on Linux or some proprietary stuff on an iPad on the other end, they do exactly the same stuff. To make it short: if something works on one platform and [...]

[click to continue reading…]

Web Reference vs. Service Reference, Part 1

January 27, 2012

Once upon a time, Freddy has delivered a great series on connecting to NAV Web Services from a smorgasbord of technology flavors. If you are a .NET enthusiast, like me, the obvious choice is to connect through the tools that are at your disposal in Visual Studio: the proxy classes. A proxy class is a [...]

[click to continue reading…]

Bug theater in Web services #5

January 23, 2012

Last Monday I’ve attended my second daughter’s birth, and then spent the week trying to relieve my wife as much as possible from anything but breastfeeding. As a matter of fact, I’d like to keep doing it, it was not only a great break from daily worries, but also a fantastic occasion to spend all [...]

[click to continue reading…]

Bug theater in Web services #4

January 16, 2012

In my country, there’s a saying: “A good horse has a hundred flaws; a bad one has only one.” It’s bad. People have asked me why I am doing this, and if I hate Web services because I’m blogging about their flaws. In fact, I love Web services, and as I said in the first [...]

[click to continue reading…]