Creating, handling and debugging the base app in Release Wave 2

Since the base application is no longer available through C/Side in Dynamics 365 Business Central Release Wave 2, we need an alternative way of searching for objects and debugging.

That means that we firstly need to find the base application.

Luckily, we all have access to it, we just don't know it.

Creating the base Application

So, here is the recipe to create one:

First open Visual Studio code and create a new project for Release Wave 2:

Point to a local Release Wave 2 service tier or to the cloud version and download symbols.

Now open the new folder in the project called: .alpackages and drag the file Microsoft_Base_Application_15.1.xxxxx.xxxxx.app to the Desktop.

Then rename the base application file to .zip.

Even though it is now a zip file, win-zip cannot open the file, but WinRar can.

You can download WinRar here. (Remember do buy one if you use it often)

Install WinRar and open the base application filer with WinRar.

This is the source code for the base application, so open the folder and copy the content to your project:

It takes a while since the base application consists of 5862 files:

And now you own your own copy of the base application:

Make sure that you include the CU number in the project name since the base application is different from version 15.0 to 15.1.

Browsing the base Application

So now that we have a copy of the base application, it is apparent that Microsoft have changed the object naming (again):

  • The object types are moved to the end of the file name
  • The object number has gone
  • Everything is in alphabetic order 

In the beginning I thought that it was a mess, but as several of my colleagues also stated, it groups all application modules or areas together. 

Good or bad? - Get used to it, it's here to stay 

It took me a while to learn to maneuver the base application, but when I decided to find all the shortcuts in VS code as described in my previous post, I found the Ctrl+P function (Find File).

So to find the Sales Header table, simply press Ctrl+P and search for salesheader.table.al:

Click the table and you have it:

Remember that you can search in ALL objects Using Ctrl+Shift+H or clicking the magnifying glass:

We never had that before .

Debugging the base Application

Now we have the base application, maybe it is also possible to debug the base application.

Yes that is possible and it is very nicely described in Stefanos blog in all details.

But I am lazy so I just do this:

  • I make sure that my launch.json is updated with the connection to the service tier I want to debug
  • Set a break-point in the table I want to debug, in this case the Sell-to Customer No. field in the Sales Header table
  • Press Ctrl+Shift+P and select AL Debug without publishing

When the web-client opens, I simply open a sales order and enter a Customer No. in the Sell-to Customer No. field:

And now we are debugging 

Remember that we still also have other tools:

  • Code Coverage showing all code that is executed while recording
  • Event Recorder showing all events is possible while recording


Anonymous
Related