12.10.2015, 10:00 | #1 |
Участник
|
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.:
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. While nice, these new properties do not really solve the problem of sizing. The biggest issue is that the manifest is hardcoded, and allowing resizing to fit the constraints of the actual device is okay, however you may still want to have different minimum/maximum sizes or shrink/stretch behavior depending on which client you are in and on which device. Thus, you either have to provide multiple different control add-ins (each with different hardcoded dimensions), or you have to pull some JavaScript tricks to resize the control add-in later on (and have Microsoft frown upon them because they are unsupported). 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. There are also significant improvements to two existing methods. First, the GetEnvironment method now returns more properties. New “Platform” property tells you whether you are running inside Windows, Web (of any flavor) or the Universal app. Quite cool. Also, the “DeviceCategory” property now adds a new value (2) indicating you are running inside the Phone client. Combining Platform and DeviceCategory, you can know exactly which environment you are in, and this can help you make relevant styling or behavior decisions in your JavaScript code. 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,. Read this post at its original location at http://vjeko.com/blog/whats-new-in-n...ontrol-add-ins, or visit the original blog at http://vjeko.com. 5e33c5f6cb90c441bd1f23d5b9eeca34The post What’s New in NAV 2016: Control Add-ins appeared first on Vjeko.com. </img> </img> Читать дальше
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|