Skip to main content

MSDYN365BC - AL Development 05 - Publish Extension.

Hi Readers,

I hope you were able to follow what we have done till now on Last articles in this series. If you haven't read the earlier article, then Refer to Table of content.

Till now we have developed some new tables and pages and customized base objects using Table Extension and Page Extension.

In this article, we will Publish this extension to see what we have done in the application.

First, I will group my objects in folders so it's easy to maintain it in Source Control.

Right click and create new folders. Create Folders for Each object Type and select files & move to respective folders as shown below.

Now it looks more organized. Lets now try to publish our extension and then we will continue adding building our extension to meet customer requirements.

Now to Publish Extension - Using Keyboard Press F5.

There can be two kinds of Errors - 

1. The request for path /DynamicsNAV130/dev/metadata failed with code InternalServerError.
To Solve this refer to this article.

2. Could not publish the package to the server. See Visual Studio Code debug console for more details.

When we open Event Log, we get this details - The runtime is set to '2.1'. It must be set to '2.0'.

Open App.Json in Extension and change "runtime" parameter to 2.0 as shown below. Additionally, you can add details about your extension if you want but the only mandatory change is in Line 22 "runtime".

I have added following additional details - 

  • publisher - Who owns the Extension.
  • brief - Summary of extension.
  • description - Details of the Extension what it is and what it does.
  • URL - URL of your / company website.
  • logo  - If you want to specify a logo file in the Extension Window.
  • runtime - To 2.0 as per error message.

** NEVER EVER change the ID of an extension. It's a unique GUID for your extension generated by the system. So don't even touch it.

Now let's try to Publish Extension - Using Keyboard Press F5. The Output and Debug Console should like as below.

Output -

Debug Console -

The system will auto start the debugger, stop the debugger using Top ribbon.

In your VS Code, you will see a new file added ".app" as shown below.

Let's see in Business Central client, and see our Application.

Using the Tell me Icon, as shown below search for Source of Sales and here is what you will see.

Point to Note - Its categories as List and available in menu due to Usage Category that we defined during developing that page.

Let's see the standard Pages where we added fields "Source of Sales". It will look like as below.

Last thing that I want to showcase in this blog. Using Tell me feature search for the page "Extension Managment" and open it.

You will find all details about the extension from this page (as shown above). All the details in app.json are available on this page.

Hope you were able to publish your extension after reading this article. In the future, we will talk and understand the process of adding code in the same extension to complete the customer requirement.

Stay tuned and let me know your views as the comment to this article.

Saurav Dhyani


  1. Hello sir, I have an issue while publishing an extension.
    "Reason: Your program license does not allow you to publish".

    I uploaded business central developer license, restarted server and tried again but no luck. Can you guide me on where it went wrong while publishing? Do I need to be in appsource or docker to publish?

    1. Hi,
      First check from Client that licensce is updated or not. You should try to Save licensce in database instead of uploading lic. in database.

  2. Hi Mr SAURAV , ihave tis error :An application object of type 'Table' with iD'' 50000" is already declared by the extension 'Application by Microsoft' (14.0.48792.0) .
    the context : il have table '50000' inthe db (developement environment with data after upgrading form Nav18 and we can't lose it) and we have developpeed a AL objects to move to BC this objects have same id and name in C/side lie thsi exemle above) , what we can do in this situation ? thanks very much.

    1. Hi,
      If you want to replace a table from C/AL to Extension, then you will have renumber and rename a table. After installing extension, you will have to move data from new number table in C/AL to Extension.


Post a Comment

Popular posts from this blog

VIEW SERVER STATE permission on SQL Server?

Hi all, Sometime While trying to Login into a database we face an error message as shown below. --------------------------- Microsoft Dynamics NAV Classic --------------------------- You cannot start Microsoft Dynamics NAV Classic because you do not have the VIEW SERVER STATE permission on SQL Server. Contact your system administrator. --------------------------- OK    ---------------------------

BC 21 and Higher - PowerShell Cmdlet (Replacement of Business Central Administration).

Hi Readers, As discussed in last article about deprecating of Business Central Administration, there are few common actions that we use in administration till Business Central 20. For our on-prem customers, we will still require doing activities. As Microsoft suggest we need to start using PowerShell cmdlet.    Let's see how to do those via PowerShell, or Administration Shell. I will be keep adding commands as you comment to this article.

Send Mail with Attachment From Navision.

Hi all, We have seen how to save a report into PDF and how to send mail to a customer. Let's link these two post in one i.e. Mailing statement to a customer into PDF Format. This article is part of the Series. Please Refer  Table of Content here . If you have the old objects set let me brief you what I will be changing -