Dynamics 365 Business Central: How to easily export all AL file names and Object Details (Type, ID, Name)

Dynamics 365 Business Central

Hi, Readers.
Recently, some developers asked me about the methods when creating BC development documents. They need to record the Object Type, ID, Name used in the project to the development documents, and they also need a list of AL file names. Is there an easier way?

AL File Name:

Object Details (Type, ID, Name)

So in this post, I would like to talk about how to easily export all AL file names and Object Details (Type, ID, Name)

Export all AL file names

This time I recommend using Windows Command, tree.

tree: Displays the directory structure of a path or of the disk in a drive graphically. The structure displayed by this command depends upon the parameters that you specify at the command prompt. If you don’t specify a drive or path, this command displays the tree structure beginning with the current directory of the current drive.

Syntax: tree [<drive>:][<path>] [/f] [/a]

Parameters:

<drive>:Specifies the drive that contains the disk for which you want to display the directory structure.
<path>Specifies the directory for which you want to display the directory structure.
/fDisplays the names of the files in each directory.
/aSpecifies to use text characters instead of graphic characters to show the lines that link subdirectories.
/?Displays help at the command prompt.

Let’s test it together.
The following is a sample project.

Open Command Prompt. (No need to run as administrator)

Open the project folder on the Command Prompt.

For example: cd C:\Users\yzhu\Documents\AL\ExportALFilesAndObjectInfo

Run tree command.
For example: tree /f >ALFilesList.txt

Completed.

Go back to the project folder and you will see that a new file has been created.

Txt file Details:

This can be easily copied to a file such as Excel. (It still needs some processing, but it’s much easier than copying them one by one from a AL file.)

Test Video:

More details: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/tree

Export Object Details (Type, ID, Name)

I recommend using an extension of VS Code, AZ AL Dev Tools/AL Code Outline.

This Extension contains a very useful Symbols browser feature.
Symbols browser shows a list of AL objects, allows to select one of them and then display details of that symbol.

For example, after installation, click the App file of the Base application, you can see the Object list like in the previous C/AL environment.

This is not limited to Base Application app files, you can also open the app file of the extension you developed.

Then you can select the object you need to copy, right-click and choose Copy Selected.

Paste to the Excel file.

Test Video:

END

Hope this will help.

Thanks for reading.

ZHU

コメント

タイトルとURLをコピーしました