36
from https://github.com/microsoft/AL/issues/6163
--
Describe the bug
When setting up SourceTableViews, TableRelations, and so on - that relate to other tables by table IDs (or, far less frequently, specify codeunit IDs to run, etc.) - we still have to use the raw integer ID, which is ugly, opaque, error-prone, and incompatible with what I hear is the plan by MS to get rid of object IDs entirely (eventually!).
--
To Reproduce
Try to make a page that shows Custom Report Selections for Customers only.
You have to enter it like so:
SourceTable = "Custom Report Selection";
SourceTableView = where("Source Type" = const(18));
--
Expected behavior
Ideally, we should be able to specify the table ID via its name in the Database:: namespace or similar, like we can in actual AL code:
SourceTable = "Custom Report Selection";
SourceTableView = where("Source Type" = const(Database::Customer));
Please consider making this possible in all such where() expressions, and for all object types. Thanks!
--
Describe the bug
When setting up SourceTableViews, TableRelations, and so on - that relate to other tables by table IDs (or, far less frequently, specify codeunit IDs to run, etc.) - we still have to use the raw integer ID, which is ugly, opaque, error-prone, and incompatible with what I hear is the plan by MS to get rid of object IDs entirely (eventually!).
--
To Reproduce
Try to make a page that shows Custom Report Selections for Customers only.
You have to enter it like so:
SourceTable = "Custom Report Selection";
SourceTableView = where("Source Type" = const(18));
--
Expected behavior
Ideally, we should be able to specify the table ID via its name in the Database:: namespace or similar, like we can in actual AL code:
SourceTable = "Custom Report Selection";
SourceTableView = where("Source Type" = const(Database::Customer));
Please consider making this possible in all such where() expressions, and for all object types. Thanks!
STATUS DETAILS
Needs Votes
Comments
Yes, this is an inconsistency and would make code much more readable.
Category: Development
https://github.com/microsoft/AL/issues/6229
Category: Development
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 will consider it in the future.
Best regards,
Business Central Team