Wizard: first set the name of the reference object and then use its same name by default
We think that these are good practices:
-
Give name (by default) to Extension Objects with the same name as its extended Object
-
Give name (by default) a Page, Report, XmlPort, etc with the same name as its referenced Object
We would like simply to change the order we enter this information in the Wizards to avoid manually copy & paste the 99% of times.
Thanks in advance...
Hi
Thank you for the suggestion. I need to think how to implement it. It will probably require some settings to disable or enable it as different companies follow different rules. I cannot find any object naming rules for AL on Microsoft Docs, but old, C/AL naming conventions article is still available and I am sure that a lot of people still follow these rules: https://learn.microsoft.com/en-us/dynamics-nav/naming-conventions
These old rules suggest that tables should use singular names, but list page names should be plural, or "
Hi @anzwdev, I think that changing the input order of those two fields in the form should be a quick and easy thing to implement while you do your research on how to implement those MS naming convention best practices that I also try to use whenever I can.
For some time now, in VSCode you can use automatic folding if you name the files properly... something like this:
For us it is a very useful functionality of VSCode, together with the alphabetical ordering of the files.
I am not sure if changing fields order will be a good solution for everybody. Not everybody uses your naming approach and I am sure that people are already used to the current order. I will add a new settings to define fields order on all wizards.
Just to add fuel to the fire, so to say. The MS conventions dictate certain standards, but it really depends on what you are creating.
Table "Project Setup" dictates page "Project Setup". But if you have table "Package" it would likely have multiple pages, "Package" or "Package Card" and "Packages" or "Package List"... and if we throw in a subtable like "Package Line" then we still yet have more conventions for the Page naming. And if you use other examples, e.g. User Settings, a record that is already a collection of things, it becomes more complicated. Throw in some always temp records and facade, and oh yeah, there's some complicated stuff.
I do agree that specifying the source before the name makes sense. From there we could define some regex rules depending on type. e.g. for extensions objects we follow pretty simple standards at my company, prefix + obj name + ext.