Use option access syntax in formulas
This content is archived and is not being updated. For the latest documentation, go to What's new and planned for Dynamics 365 Business Central. For the latest release plans, go to Dynamics 365 and Microsoft Power Platform release plans.
|Enabled for||Public preview||General availability|
|Admins, makers, marketers, or analysts, automatically||Sep 1, 2022||Oct 1, 2022|
When setting up SourceTableViews, TableRelations, and so on that relate to other tables by table IDs (or, less frequently, specify codeunit IDs to run), developers had to specify the integer ID of the target object. This wasn't user friendly or readable and could be error-prone.
Thus, the AL language now supports using Option Access syntax (names) in formula properties. This removes the need for the hard-coded integer ID values and improves the readability and the maintainability of the code.
The AL language now supports using Option Access syntax in formula properties. Thus, instead of, for example,
SourceTableView = where("Source Type" = const(18));
it will be possible to use the option name, for example,
SourceTableView = where("Source Type" = const(Database::Customer));
Tell us what you think
Help us improve Dynamics 365 Business Central by discussing ideas, providing suggestions, and giving feedback. Use the forum at https://aka.ms/bcideas.
Thank you for your idea
Thank you for submitting this idea. We listened to your idea, along with comments and votes, to help us decide what to add to our product roadmap.