Hi, Readers.
Today I would like to briefly talk about how to get the extension/app name from App ID in AL.
App ID is the unique ID of the extension. When the app.json
file is automatically created, the ID is set to a new GUID value. (Should uniquely identify the application and remains static across versions.)
Setting | Mandatory | Value |
---|---|---|
id | Yes | The unique ID of the extension. When the app.json file is automatically created, the ID is set to a new GUID value.Note: The app ID is used at runtime to bind table names contained in the application. Changing the app ID results in data from old tables not being used. |
name | Yes | The unique extension name. The name can be changed to reflect branding or acquisition, but then the version must be incremented.Note: The name might be used by other extensions to express a compile-time dependency on the extension. Changing the name of your extension forces any extensions that take a dependency to download symbols and recompile their extension. For more information, see App Identity. |
For example,
“id”: “437dbf0e-84ff-417a-965d-ed2bb9650972”
“name”: “Base Application”

For more settings, see JSON files.
So is it possible to quickly get the name from the id? In this post, I mainly introduce two simple methods.
1. Using codeunit 2504 “Extension Management”
There is a standard method in it, procedure GetAppName.

A very simple example:


2. Using system table 2000000153 “NAV App Installed App”
This table was used when we discussed Dynamics 365 Business Central SaaS: How to get the list of Extension ID (App ID), Extension Name, Publisher, etc. via AL.


Another simple example:

Same result:

If you need to get the id from the name, you can also use this table, which stores all the info of installed extensions. For example,


Very simple, give it a try!!!😁
PS:
1. Dynamics 365 Business Central: How to get Extension Package ID from App ID in AL
2. Dynamics 365 Business Central: How to quickly get the id from Guid without brackets
END
Hope this will help.
Thanks for reading.
ZHU
コメント