Server Extensibility Demos
Yesterday, as a part of Microsoft’s Road To Repeatability program, I delivered a live meeting session about server extensibility in NAV in which I focused on certain areas of .NET…
Yesterday, as a part of Microsoft’s Road To Repeatability program, I delivered a live meeting session about server extensibility in NAV in which I focused on certain areas of .NET…
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.
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.
Yesterday, I said I was closing this year of blogging, but I wasn’t really. Closing a year with 39 posts, and leaving a question lingering, wouldn’t be too fair, would it? 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.
And yes, I almost forgot… Somebody (sorry, I didn’t catch the name) asked me to put my life hack on the blog as well, so here it is. For all…