JavaScript control add-in allows custom controls and visual elements for displaying and modifying data way beyond what you can accomplish with standard Dynamics NAV / 365 Business Central framework. While .NET development is dropped in Dynamics 365 Business Central extensions for web, JavaScript steps up to take its place. In this article, we will go step by step with increasing complexity on the basics of Dynamics 365 Business Central JavaScript add-in.
Tag Archives: JavaScript
Encapsulation in JavaScript
This will be my last post in the “JavaScript for (C/)AL Developers” series today. If I continued blogging about nearly pure JavaScript stuff, you could reasonably ask if this is in fact an NAV blog or a JavaScript one. It’s still NAV, and while the stuff I am about to write about is purely a JavaScript concept, I find it highly relevant for any control add-in developer. So, hold my beer, and bear with me for another one.
Creating a Control Add-in using Javascript and calling it in AL.
In NAV 2017, control add-ins were called through .NET code which is imported as .ZIP files. With NAV 2018 .NET is not supported in extensions. Thus we’ve to perform the following steps to make a Control Add-in in Javascript.
Capturing unhandled errors in JavaScript Control Add-ins
Not that I am saying it’s a good thing, but trial and error is a fairly common approach to debugging in the NAV world. We’ve all done it. Heck, even with the comprehensive testability framework built in, we all still do it more often than we’re happy to admit while sober.
Overloading Methods With JavaScript Control Add-ins
Switching from C# to JavaScript to develop your control add-ins might get you scratching your head more often that your scalp, or nails for that matter, might be happy with.
One of those is overloading. In C#, this is a no-brainer:
Passing JSON from JavaScript to C/AL–Part 2
I stand corrected. A month ago I wrote about how to pass JSON from JavaScript to C/AL and then handle it inside, and what I wrote is not wrong, but I just figured a simpler way.
Too bad all this is not documented, but hey – that’s why blogging is fun.
Passing JSON from JavaScript to C/AL
If you read my last postabout how to pass objects from C/AL to JavaScript, you must have wondered if it’s possible to also pass objects from JavaScript back to C/AL.
Wonder no more. It is. And here’s how.
Again, a bit of theory. JavaScript uses JSON to represent objects. Any object that resides in memory of a JavaScript runtime environment can be represented as JSON. For example: