NAV Development Tools Preview – April Update


Welcome to the April update for the Developer Preview. Again this month we’ve been working on a lot of exciting stuff. Check out the list of what’s new below.

– Query and XmlPort objects have been added to the compiler.

– This update contains a conversion tool that allows you to take existing Dynamics NAV objects that have been exported in .txt format and convert them into the new .al format. It’s a two-step process; firstly exporting the objects from C/SIDE in a cleaned format, and secondly converting them to the new syntax. Give it a try by following these steps:

  • Export the objects using the command line. The client GUI doesn’t have the switch available, so you must use the command line, for example for table with ID 225:
    finsql.exe Command=ExportToNewSyntax, File=exportedObjects.txt, Database=”Demo Database NAV (10-0)”, ServerName=.\NAVDEMO ,Filter=Type=table;ID=225
  • Run the txt2al.exe converter tool. The tool is located in the ..\Program Files (x86)\Microsoft Dynamics NAV\100\RoleTailored Client folder. Usage:
    txt2al <Source directory> <Destination directory> [-rename]
    -rename – Name the output files based on the object name.

Important: The conversion tool should only be used for export. Importing objects that have been exported can damage your application!

– You can now embed Permission Sets, Tenant Web Service definitions, and Custom Report Layouts in Extensions V2. The process is similar to the one that you used for Extensions V1 and you can follow the existing documentation: https://msdn.microsoft.com/en-us/dynamics-nav/how-to-export-data-for-an-extension.

– AL:Go! startup is under development to start supporting the choice between online and local development. For now, just select the Local server option.

algo_cloud

Typing Ctrl+Shift+P opens the command palette where you can execute the AL: Go! command. This will still prepare an empty project for you to start with and now includes a step for choosing if you’re working locally or against a cloud instance.

Note: When you do an F5 deploy you may be asked to enter your Azure account. This is a bug and because we haven’t been able to set “local” for your debug environment. To set this yourself, select the debug button from the left-hand menu and pick the local in the drop-down list for the configuration.

– In the Designer, drag and drop a page part to reposition it on the Role Center or FactBox pane. You can also hide an individual part. For now, the only way to make the hidden part visible again is to uninstall the extension or modify the extension using Visual Studio Code.

designer_drag

– You can now reposition the Freeze Pane on any list page or part by using the jewel on the column header.

designer_freeze

– The new Query and XmlPorts objects have snippet support as well. Take a look at tquery and txmlport. Here is an example of an XmlPort object in the new syntax:

xmlport

The Azure Gallery is already updated with the new images and any code written from last month should be forward compatible. Still, it’s always wise to have an outside source control system to let you save your work as you go.

We continue to fix the bugs reported by you. Keep them coming! You can see all the filed bugs on our GitHub issues list (https://github.com/Microsoft/AL/issues). To get an updated image you can see the steps for getting it in the original blog post or jump directly to the Azure Gallery signup at http://aka.ms/navdeveloperpreview. For a list of our previous blog posts, see the links at the end of this post.

Please file any bugs you find in our GitHub issues list https://github.com/Microsoft/AL/issues and don’t forget you’re welcome to contribute to the snippets to help everyone.

Thanks again and see you next month!

/NAV

Our earlier blog posts:

NAV Development Tools Preview – March Update

NAV Development Tools Preview – February Update

NAV Development Tools Preview – January Update

Announcing the Preview of Modern Development Tools for Dynamics NAV

Comments (8)

  1. Frédéric Vercaemst says:

    Is it on the roadmap for the convertor tool to use ‘txt2al’ to create new table extension / page extension files based on modified standard NAV objects containing new fields, functions, …?

    1. We plan on making two conversion tools. The first is a direct C/AL to new syntax conversion tool so you can bring existing projects to the new dev environment. The second tool will help convert existing extensions to the new extension format (i.e., delta files into new table extensions and page extensions).

      It’s an interesting idea to have a tool that can separate existing code customizations and repackage them as extensions. I suspect this would be something that could only work with very simple changes and that the extensibility model with extensions is a different type of programming. Instead of classical C/AL procedural flow, we are encouraging extension through events and the extension objects. The events model requires rewriting/redesigning your code.

      But it’s a good idea – we’ll have a talk at work and see if someone can come up with something clever.
      Thanks!
      Stuart

  2. Mark Brummel says:

    For those who use the demo install, there is a small issue with the provided example. Demo Database NAV (10.0) should be Demo Database NAV (10-0)

    1. Thanks Mark, will update the blog.
      Stuart

  3. Even after a total uninstall of NAV 2017 and reinstall of Tenerife CTP05 I am getting this error on Win 10 Version 1607 when I try to convert the files exported with ‘ExportToNewSyntax’ with txt2al:
    Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly ‘CommandLine, Version=1.9.71.2, Culture=neutral, PublicKeytoken=de6f01bd326f8c32’, or one of its dependancies. The system cannot find the file specified. at Txt2Al.Program.Main(String[] args)
    Are there any other prerequisites needed to get this to work?

    1. I tried this once more on a newly created virtual server with ‘Tenerife’ as the only NAV version, but txt2al crashes instantly there as well. At least here the details about the nature of the crash are provided by the OS 😉
      Problemsignatur:
      Problemereignisname: APPCRASH
      Anwendungsname: Txt2Al.exe
      Anwendungsversion: 1.0.0.0
      Anwendungszeitstempel: 59032553
      Fehlermodulname: KERNELBASE.dll
      Fehlermodulversion: 6.3.9600.18340
      Fehlermodulzeitstempel: 5736541b
      Ausnahmecode: e0434352
      Ausnahmeoffset: 00014878
      Betriebsystemversion: 6.3.9600.2.0.0.272.7
      Gebietsschema-ID: 1031
      Zusatzinformation 1: 5861
      Zusatzinformation 2: 5861822e1919d7c014bbb064c64908b2
      Zusatzinformation 3: 6ee2
      Zusatzinformation 4: 6ee2432e64e99bdcea5e4be767a3b1a2

      1. Stanislaw Stempin says:

        Please use the NAV Developer Preview April Update image for testing the new development environment: http://aka.ms/navdeveloperpreview
        CTP drops will work in most cases but we do not provide support for them in this area.

  4. yansebanger says:

    Secure Connection Failed

    An error occurred during a connection to channel9.msdn.com. Invalid OCSP signing certificate in OCSP response. (Error code: sec_error_ocsp_invalid_signing_cert)

    The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
    Please contact the website owners to inform them of this problem.

Skip to main content