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 -
** 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
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
Hello sir, I have an issue while publishing an extension.
ReplyDelete"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?
Hi,
DeleteFirst check from Client that licensce is updated or not. You should try to Save licensce in database instead of uploading lic. in database.
Good Job.
ReplyDeleteHi 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) .
ReplyDeletethe 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.
Hi,
DeleteIf 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.