Well, control add-ins are not new in NAV 2016, they have been around for a long time now. But, they have been improved and this blog post is about these improvements.
Of course, the improvements are exclusively in the Web client framework, not the Windows client, and I am educated-guessing here that we won’t really see many improvements in the control add-in framework for Windows in the future. Why would we? All control add-ins should target all clients and use the Web framework, anyway so the case for Windows client is getting weaker and weaker.
So, let’s take a look at what kind of improvements there are for the Web client framework. First of all, there are new Manifest.xml properties.:
This is on top of requested width/height and vertical/horizontal stretch ones we already had since 2013 R2. The change is not merely cosmetic and it does influence the behavior of the control add-ins quite a bit. Earlier, any control add-in got it’s reserved piece of real estate and it could never shrink to a smaller size, no matter what. Also, if allowed, it always stretched as far as it could.
In Microsoft Dynamics NAV 2016 the requested height and width determine the initial size, but you can then control whether, and how far exactly, it can stretch or shrink. The framework uses these properties to define the inline styles for the IFRAME element.
If I could have a say in the matter, I’d drop those properties from the manifest altogether and have built-in properties on the control add-in control variable accessible through C/AL, or keep the properties in the manifest, and still allow us to access them from C/AL at runtime. I’ll make this suggestion for a future release, and let’s see if it happens. I had an improvement suggestion accepted before, so this one might get in, too.
Other improvements include the two new functions for authenticating users, which are currently only useful in the Social Listening context, but you might be able to find some use for them yourself. They are OpenWindowForAuthentication and OpenWindow, and they are undocumented at the time of writing of this blog.
And finally, my absolute favorite improvement, which also went silently into the framework, is the GetImageResource method. In earlier versions of the framework, this method could only return a png image which absolutely had to have the .png extension. In NAV 2016, you can now retrieve any file type, not necessarily an image, which makes this little inconspicuous function quite versatile. And, on top of everything, we are now free to organize the resources into subfolders of whichever name, and depth. I have already (ab)used this feature in my Directions EMEA 2015 demo.
I’m certainly going to blog much more about this and other features of the control add-ins framework, so stay tuned,.