Development
-
DEmos from the .NET Interop for Mere Mortals
Thanks to everybody who attended my session today at NAV TechDays 2014 in Antwerp. As promised, here are the goodies from the session. I’ve simply taken the objects and I deliver them here with no explanations or comments – when Luc publishes the sessions and the slide decks on Mibuso, you’ll be able to figure out what’s what.
-
Adding a ControlAddInReady event to custom controls
When interacting with custom controls on your pages from C/AL, you must be absolutely sure that the control has been instantiated. If it is not, you’ll get an error such as this: The reason why this happens is that C/AL code gets to execute before the page has been rendered, and thus also before the custom controls have been instantiated.
-
GETLASTERROROBJECT vs. GETLASTERRORCODE
Good. At this point we know everything about exception types, what they are, how to obtain them, how to compare them (at least directly). All of these have suddenly become relevant now that we have GETLASTERROROBJECT function in NAV 2015. But an old friend is still around, the GETLASTERRORCODE function, what about it?
-
Upgrade Codeunits in NAV 2015
Once upon a time, and really not such a long time ago, there was no such thing as a codenit type. In all honesty, there is still no such thing as a codeunit type – there is subtype , though. (Why we have subtypes, without having types, beats me, but let’s let the semantics go.) Nowadays, we have four codeunit types.
-
Synchronizing Database Schema in NAV 2015
Before NAV 2013 R2 the “database schema synchronization” was an unknown term. Either you could do a database schema change, or you couldn’t. There was no such thing as data loss. If you wanted to change a field type or delete a field (or delete the whole table for that matter), and there was data in that field in the table, you got an error.
-
Trick: Subscribing to any Control Add-in event through pure C/AL
So, it worked. I found just enough spare time to try out the crazy idea I mentioned in the last post. It’s about control add-ins and events. In the last post I gave a tip about exposing the actual control as a property decorated with ApplicationVisible, which allowed you to directly access all properties and methods of the control.
-
Tip: Interacting with the actual .NET Control Add-in controls
The control add-in framework in NAV 2013 is great, because apart from allowing you to put a custom Windows Forms control on the page, it also allows you to interact with it through properties, methods, and events. In my classes I typically create a custom text box control that exposes a property to set the background color on the text box.
-
Generics in .NET Interop for NAV 2013
.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.
-
Microsoft Dynamics NAV 2009 R2 ships
I’m growing increasingly impatient as the progress bar on my File Transfer Manager is approaching 100%. Behind the cryptical download title—Dynamics.NAV60R2.HR.1097366.DVD.zip—hides the much awaited Microsoft Dynamics 2009 R2 HR (Croatian) release of Microsoft Dynamics NAV.
-
10 reasons that make design absolutely necessary
Design is one of a kind. Other phases in Sure Step are understood and accepted as good and necessary. But design, do we really do that? Is it really necessary? Who’s going to pay for it? Does the customer really need all those documents? Instead of writing documents, you could have it developed in the same, or less time.