al-code-outline icon indicating copy to clipboard operation
al-code-outline copied to clipboard

AL File Wizard filenaming convention

Open sveinur77 opened this issue 1 year ago • 4 comments

It would be nice if it would name the files correctly, when using the AL wizard, or at least make it setuable what the filename should be. According to Microsofts guidelines files should be named <Objectname>.<ObjectType>.al and not <Partialobjecttype><ObjectId>.<Objectname>.al https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/compliance/apptest-bestpracticesforalcode

Thanks :)

sveinur77 avatar Jan 03 '24 12:01 sveinur77

Hi

Wizards are using Waldo's CRS AL Language extension to create names of the files. All you have to do is to populate "CRS.FileNamePatters", "CRS.FileNamePatternExtensions" and "CRS.FileNamePatternPageCustomizations" settings or run "CRS: Configure Best-practice File Naming".

It is better if there is just one community VS Code extension and one set of settings that allows us to specify how we want to name our file.

anzwdev avatar Jan 07 '24 18:01 anzwdev

HiCool, that makes sense. I did not know this.Thank you very much for the explanation.BrSveinurDen 7. jan. 2024 kl. 19.51 skrev Andrzej Zwierzchowski @.***>: Hi Wizards are using Waldo's CRS AL Language extension to create names of the files. All you have to do is to populate "CRS.FileNamePatters", "CRS.FileNamePatternExtensions" and "CRS.FileNamePatternPageCustomizations" settings or run "CRS: Configure Best-practice File Naming". It is better if there is just one community VS Code extension and one set of settings that allows us to specify how we want to name our file.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

sveinur77 avatar Jan 08 '24 14:01 sveinur77

If the extension is already using CRS, is there a way to automatically generate the object name when creating a new extension object? I usually have to give the file an arbitrary name and then use the "Reorganize - Current File" command.

cegekaJG avatar Jan 10 '24 13:01 cegekaJG

Waldo explains how to use the CRS settings here

https://www.waldo.be/2018/07/03/crs-al-language-extension-file-management/

By setting the crs parameters correctly, the the files are named accordingly, at least when using the AL wizard. You can also activate automatic renaming, when saving the files.

sveinur77 avatar Jan 10 '24 16:01 sveinur77