Control Add-ins and Version Compatibility
(Update, 20.4.2015: As it turns out - this post is not entirely accurate, as pointed out by Johannes Sebastian. Please read the next post to learn more about which parts…
(Update, 20.4.2015: As it turns out - this post is not entirely accurate, as pointed out by Johannes Sebastian. Please read the next post to learn more about which parts…
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:
However, when you want to do that in JavaScript, if you are not a JavaScript developer, making this work is not as straightforward as a regular JavaScript Joe would find it.
When you reference a .NET class that exposes events, and you switch on the WithEvents property, C/SIDE creates the event triggers for you. If you later want to update the reference to the .NET class, for whatever reason (like, there is a newer version of the assembly), updating the reference will actually delete the event triggers with all the code in them.
To be fair to this non-feature, at least it warns you politely:
This is not something you experience once in a geologic era. When you are developing your own assemblies, this will happen fairly often – as often as you add or remove events to/from your classes, and you want to reflect that in the Development Environment. Or as often as you increase the version of your assembly.
Unfortunately, there is no way in the Development Environment to update the reference while actually retaining the event triggers or code in them.
But still, there is a way, and a fairly easy way at that.
When you have to format C/AL variables (numbers, dates/times, booleans) for exchange with other apps, call FORMAT(variable,0,9) instead of simply FORMAT(variable). The format 9 formats the variable according to XML…
A couple of weeks ago, a new page was created on PartnerSource – the “Demo Microsoft Dynamics NAV” page. You can access it at http://aka.ms/demonav The page contains (at the…