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.

Regards,
Saurav Dhyani
www.sauravdhyani.com

Comments

  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?

    ReplyDelete
    Replies
    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.

      Delete
  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.

    ReplyDelete
    Replies
    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.

      Delete

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    ---------------------------

RTC Report It is not possible to instantiate the Visual Studio bridge.

Hi all, As a Navision developers I have Multiple Versions of Navision running in single Machine. As discussed Earlier in the post how to run multiple Version of RTC in single machine. So my machine have following details for RTC Versions - NAV 2009 R2    - is installed. NAV 2009 SP1  - is copied at C:\Program Files (x86)\Microsoft Dynamics NAV\60\NAV 6.0 SP1 IN\ NAV 2009         - is copied at C:\Program Files (x86)\Microsoft Dynamics NAV\60\NAV 6.0 IN\ This approach has been working great for execution of Classic and RTC Clients. However, after installing Dynamics NAV 2009 R2, if i tried to view the Layout for an NAV 2009 SP1 Report i was getting the following error: ---------------------------  Microsoft Dynamics NAV Classic  ---------------------------  It is not possible to instantiate  the Visual Studio bridge.  ---------------------------  OK    --------------------------- After searching for the error i figured out the issue was due to - Design change in NA

NAV 2013 R2 - Cumulative update 12 Released.

Hi all, Please find below the details of  Cumulative Update 12 released for Microsoft Dynamics NAV 2013 R2. Title - Cumulative Update 12 for Microsoft Dynamics NAV 2013 R2 Build No. - 38053 Release Date - October, 2014 Local Version Included - AU, AT, BE, CH, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, SE, UK, RU Download Link Note: Implementing this cumulative update will require a database conversion unless you have already implemented update rollup 5.