Quantcast
Channel: FORNAV
Viewing all articles
Browse latest Browse all 372

The ForNAV Modern Object Explorer

$
0
0

The ForNAV Modern Object Explorer – A way to manage Visual Studio AL-code from within NAV

 

By Michael Nielsen, Partner, ForNAV

Read more about Michael here: https://en.wikipedia.org/wiki/C/AL and www.fornav.com/about-us/

 

You can use the ForNAV Modern Object Explorer to:

  • Get an overview of which extension objects are installed on a NAV system.
  • Create and manage Visual Studio Code al-projects.
  • Export and/or run your extension al-objects.

 

You can download the ForNAV Modern Object Explorer for free here:  https://www.fornav.com/documents/ForNavModernObjectExplorer.fob

 

Page sample:

 

The following illustrates the creation .json config files from NAV server settings to support Visual Studio code:


 

The Classic NAV Object Designer

The NAV Object Designer was originally written over 25 years ago and since then it has been the cornerstone of all NAV developers’ lives.

 

The design was more or less a rip-off of Microsoft Access and, like Access, it has not changed much over the years.  The Menu and Query suite was introduced, Forms became pages and the Data port became the XML port – but everything else is the same

It is also no secret that the Object Designer is built on top of the  “Object” table 2000000001, which has a BLOB field where the source code is stored in a binary format called STAB = Structured Table. The format was created to hold an array of structs, where each struct has a property bag.

 

With the introduction of Visual Studio Code for NAV, this will change over time because the “Object” table over time will be replaced by other constructs. This will be a lot better at bringing “modern” constructs, such as version control, modulization, apps and Unicode, to the NAV world as a necessity, and it will result in a highly needed upgrade of the NAV developer experience.

However, the closest you will get to the object designer at this point is the Extension management page, which can tell you which extensions are installed on your system and let you download a zip file with the source files from the extension:

 

Creating a new experience:  The ForNAV Modern Object Explorer

Because of this, ForNAV decided to create a modern version of the object designer –The ForNAV Modern Object Explorer – to help developers get through the transition to the new and better world beyond C/SIDE.

To keep it simple, the new designer is created as a standard NAV page. It has the number 1000, which is a standard NAV page that was discontinued years ago, allowing any partner or customer to install it without having a special license. The page builds on top of table 2000000150, NAV App Object Metadata, which holds BLOBS fields with the al-source and layouts for Word and RDLC layouts.

 

The resulting page looks like this and is relatively simple:

 

The page has the following fields and buttons:

  • RDLC Layout and Word Layout check boxes – Indicates if a report has a RDLC and/or Word layout
  • Version List field – Looks for a comment in the al source code with the prefix “version”, which is created from the version list when a NAV object is converted from .txt to .al using the txt2al tool.
  • Extension Version and Extension Status fields – Displays the status and version of the extension.
  • Create New Project – Click to select a project directory and create new app.json and launch.json files, based on the NAV server setting.
  • Export Objects – Click to export the selected objects as .al files to a project directory. Report layouts are also exported as .rldc and .docx files.
  • Launch Visual Studio Code – Click to select the Visual Studio Code project directory and open the project in Visual Studio Code. If the app.json and launch.json files do not exist for the project, both are created.
  • Run – Click to run the current object.
  • Extension Management – Click to open the Extension Management page with the extension the object belongs to.
  • Installed Only – Click to show only the objects which belong to an extension that has the status “Installed”.
  • Filter field – Type to filter on the project type, such as the classic Object Designer.

 

A special thanks to Mark Brummel (Doctor Temp-table) who help putting this together and gave valuable input on functionality and usability.

Indlægget The ForNAV Modern Object Explorer blev vist første gang den ForNAV.


Viewing all articles
Browse latest Browse all 372

Trending Articles