In September, we announced that we would release a preview of the developer tools that will let a new generation of developers start building extensions for Dynamics NAV and Dynamics 365 for Financials. In this blog post we'll talk a bit more about what's coming and how you can use it.
Tell me more!
Later this month we'll make an Azure Gallery image available that contains the product and tools to start learning about what we call Extensions 2.0. Extensions 2.0 is the name we use for the new versions of extensions - ones that aren't based on the DELTA file design. Making extensions with the new tools is much easier than the current tools suite you may be familiar with. With Extensions 2.0, you code and write new objects that describe the additional capabilities you want in the system. You’ll use Table Extension and Page Extension objects to describe new fields and UI elements, and you'll use the in-client page designer to make those changes in a WYSIWIG way – all of which are stored as extensions under the cover.
So, extensions are customizations?
Yes! If you're familiar with the Dynamics NAV customization model, then you're probably used to making changes directly on objects. The extension model asks you to design your changes differently – namely make those changes by extending the core objects and linking to code using events. For example, instead of adding a new field that represents the customer’s birthday to the customer table, put that field into a table extension. And if you want to write code then put it in an event subscriber which can then check the birthday and then do something about it.
You said preview - what does that mean?
Rebuilding the development tools for Dynamics NAV and Dynamics 365 for Financials is a long-term investment. We're not done with everything yet but we did want to give you a chance to see what we've done so far and to comment on it. Here’s some things to pay attention to:
- The release is made available on an Azure Gallery image.
- The preview is for you to play with and test - don't expect to write production code with it and don’t use it in production.
- Don’t try to write XMLPorts, Queries, Menusuites, or Reports – those aren’t implemented yet. You can run existing ones, but you can’t write new ones.
- Don't try to take your existing solution and convert it - there are unfinished features and you'll probably be more frustrated than anything that the code doesn't work.
- Don’t try to use .NET Interop, it’s been disabled for the moment while we work on a more secure way to offer this functionality.
- Do try out the in-client page designer - look for a little design icon in the top right corner of the screen.
- Do write new code using the new object types - Table Extensions and Page Extensions.
- Do notice that not all procedures in the application will be available to call. We have blocked access to procedures which may run unsafe .NET or insecure methods.
- Do write event/subscriber solutions - follow the existing guidelines on building extensions for the general design principles.
- Do try the sample code we’ve published to get familiar with the syntax.
OK, that’s a long list – what about the future?
We’re working – we know we have a long way to go. Your feedback (that’s a polite way of saying letting us know what bugs you find) is important. What you find and report will determine which things we build.
On the larger roadmap, we’ll add much more to the page designer. We’ll add the ability to add actions, set properties and a whole new way of building pages. In Visual Studio Code, we’ll be adding support for XMLPorts, Queries, and Reports. We will build functionality that allows access to .NET types to let you call web services and handle files and strings safely. And more.
We’re also looking at bringing these two worlds together, so that designing feels natural in the client, and coding is easy in the editor, and that switching between the two for debugging is smooth. We’ll make it easy to manage extensions and add permissions to control who has access.
In the meantime, have a look at the sample code on GitHub https://github.com/Microsoft/AL. If you blog about it, don’t forget to use our hashtag #DYNDEV365. Right now, go put the coffee on – good things are coming soon!