BC AL Journey #17

So far in our Business Central AL Journey series we have been working with the core Business Central components. There is a lot we can do with just core Business Central, but as we add additional extensions, we may have need to extend those as well. The great news is that Business Central is based on Extensions extending Extensions.

Customizing an Extension is no different than any of the customization we have applied to Sales Headers, Customers, Items, or what not. We only have to tell Visual Studio Code what extensions we intend to extend.

First off, we are going to need to have an extension installed for us to extend. For this I’m going to install the “Barcode Generator PowerTool” form Insight Works. Apps for Dynamics 365 Business Central – Insight Works. They are not a sponsor, but a great group of people to work with, and the extension is free.

Following the installation instructions from your extension provider, or installing from the App Center marketplace, you will need to find your extension in the Extension Manager of Business Central.

Click on the Magnifying Glass in the upper right corner of Business Central and type some form of Extension Manager.

This will display the installed extension in a grid view. Nobody wants the grid view, so switch it to the list view.

I’m going to filter by name to find Barcode Generator, as the list is long, and I want to keep the screen shots clean.

From here, I’m going to note the version number. Next, we click on the name and pull up the Extension Settings.

From this page we take note of the App ID, Name, and Publisher. A side note, clicking three times on the App ID will highlight all the characters, including ones that don’t fit on the field, which you can then copy with CTRL-C.

We now enter that data into the dependencies list of your App.JSON

{
  "id": "776d940f-fc7f-4a22-8901-3c34407df048",
  "name": "Aardvark Labs Basic Customizations",
  "publisher": "Aardvark Labs",
  "brief": "Aardvark Labs Customizations.",
  "description": "Customizations provided by Aardvark Labs",
  "version": "20.0.0.0",
  "privacyStatement": "http://aardvarklabs.blog",
  "EULA": "http://aardvarklabs.blog",
  "help": "http://aardvarklabs.blog",
  "contextSensitiveHelpUrl": "http://aardvarklabs.blog",
  "url": "http://aardvarklabs.blog",
  "logo": "./AardvarkLabsIcon.jpg",
  "supportedLocales": ["en-US"],
  "features": [ "TranslationFile", "GenerateCaptions" ],
  "dependencies": [
    {
      "id": "62080fe0-d57f-4d4c-aed1-ac539db3a244", 
      "name": "Barcode Generator", 
      "publisher": "Insight Works", 
      "version": "1.5.8830.3"
    }
  ],
  "screenshots": [],
  "platform": "20.0.0.0",
  "application": "20.0.0.0",
  "resourceExposurePolicy": {
    "allowDebugging": true, 
    "allowDownloadingSource": true, 
    "includeSourceInSymbolFile": true
  },
  "target": "Cloud",
  "idRanges": [
    {"from": 50000, "to": 59999}
  ],
  "runtime":"13.0"
}


With this complete we can press CTRL+SHIFT+P and select AL:Download symbols.

We should now see the Insight Works extension in the .alpackages folder.

Clicking on the .app file in Visual Studio Code will display all the objects in that extension.

Depending on the publisher of the extension you may be able to drill even deeper into the objects.

If needed, I could create a table extension off IWX Barcode as I would any other table.

This is one of the really powerful elements of customization in Business Central. If you have a solution that gets you 90% to where you need to be, you can always extend it for that last 10%.

Important things to note. If you later decide to uninstall a dependent extension, it will uninstall your extension. In this example, if I uninstall the Barcode Generator extension, then the extension I created will also be uninstalled. I would then have to remove the dependency, and all customization based on that dependency and republish my extension.

It is a “best practice” to create multiple extensions isolated by dependency. This can limit the impact of uninstalling an extension by only effecting extension that extend that extension.

Well, there you have it, the Business Central extension rabbit hole. I hope this empowers you to update your system to include those missing features you need.

One response to “Easy Steps to Extend Extensions in Business Central”

  1. […] your extension depends on another extensions, as we discussed in BC AL Journey #17, it will be removed if that dependent extension is removed. If this is a PTE extension, the […]

    Like

Leave a comment

Trending