41
The following idea drives us in our internal development and in the implementation of our previous industry development.
Wouldn't it be wonderful if you could define a table or page extension only once, instead of always creating another extension for the implementation of one or more fields?
This new object type would have the full possibilities of a normal extension and would only differ in that the header contains a list of the tables and pages to be extended by semicolon.
The syntax would be
tableextension 123456 "XXX Item Fields" extends Item; "Item Variants"; "Sales Line"; "Sales Shipment Line"; "Sales Invoice Line"; "Sales CrMemo Line"; "Sales Line Archive"
Only the compiler would have to interpret the semicolon chain and convert the objects accordingly.
This way you would have only one extension in VS instead of seven.
In the page extension I can decide again whether the previously created fields can be edited or not via the new table extension, for example. In my example you would then create an extension for the new field with an editable field and an extension for the editable variant.
pageextension 123456 "XXX Item Fields Edit" extends "Item Card"; "Sales Order Subform"; "Sales Quote Subform"; "Sales Invoice Subform"; "Sales CrMemo Subform
and an extesion for the non-editable variant
pageextension 123457 "XXX ItemFields NonEdit" extends "Sales Shipment Subform"; "Sales Invoice Subform"; "Sales CrMemo Subform"; "Sales Quote Archive Subform"...
You would have to think a bit about how and where to position the fields in the pages, i.e. whether the commands addafter, etc. are allowed or only addlast is allowed but in my opinion this is the least of the problems.
In the tableextension you could even add a function behind the fields, which can be used for all tables. This can be achieved by clever programming with variants.
The idea comes from my current work, that I have to insert a few identical fields in nearly 180 tables and again at least 200 pages. You can imagine the huge list in VS Code...
Wouldn't it be wonderful if you could define a table or page extension only once, instead of always creating another extension for the implementation of one or more fields?
This new object type would have the full possibilities of a normal extension and would only differ in that the header contains a list of the tables and pages to be extended by semicolon.
The syntax would be
tableextension 123456 "XXX Item Fields" extends Item; "Item Variants"; "Sales Line"; "Sales Shipment Line"; "Sales Invoice Line"; "Sales CrMemo Line"; "Sales Line Archive"
Only the compiler would have to interpret the semicolon chain and convert the objects accordingly.
This way you would have only one extension in VS instead of seven.
In the page extension I can decide again whether the previously created fields can be edited or not via the new table extension, for example. In my example you would then create an extension for the new field with an editable field and an extension for the editable variant.
pageextension 123456 "XXX Item Fields Edit" extends "Item Card"; "Sales Order Subform"; "Sales Quote Subform"; "Sales Invoice Subform"; "Sales CrMemo Subform
and an extesion for the non-editable variant
pageextension 123457 "XXX ItemFields NonEdit" extends "Sales Shipment Subform"; "Sales Invoice Subform"; "Sales CrMemo Subform"; "Sales Quote Archive Subform"...
You would have to think a bit about how and where to position the fields in the pages, i.e. whether the commands addafter, etc. are allowed or only addlast is allowed but in my opinion this is the least of the problems.
In the tableextension you could even add a function behind the fields, which can be used for all tables. This can be achieved by clever programming with variants.
The idea comes from my current work, that I have to insert a few identical fields in nearly 180 tables and again at least 200 pages. You can imagine the huge list in VS Code...
STATUS DETAILS
Needs Votes
Business Central Team (administrator)
Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we might consider it in the future.
Best regards,
Business Central Team