"Table Relations Metadata" provides an incomplete definition of the actual relations, while it provides the conditions to establish a relation it doesn't provide the filters that are applied to the related table.
Previously this relation could be queried using the "Object Metadata" table, but this is unfortunately not available for Cloud Developement.
This problem has been around for quite a while, at least since 2019 where i found it mentioned here:
https://github.com/microsoft/AL/issues/5512
This issue was reopened earlier this year, and the author was instructed to use an Idea for it:
https://github.com/microsoft/ALAppExtensions/issues/26235
There are already several Ideas regarding this issue or similar ones steaming from "Object Metadata" being inaccessible for Cloud.
- Exposing Object Metadata in Business Central Public Cloud
- https://experience.dynamics.com/ideas/idea/?ideaid=2824e8e7-e7c4-ea11-bf21-0003ff68992a
- Adding possibility for more information shown from "Table Relations Metadata"
- https://experience.dynamics.com/ideas/idea/?ideaid=a4b54e20-03c4-ed11-9ac7-0003ff45ac6d
- Ammend system tables: table 2000000136 "Table Metadata", table 2000000038 AllObj, table 2000000058 AllObjWithCaption
- https://experience.dynamics.com/ideas/idea/?ideaid=e297741d-39ba-ee11-92bd-6045bdaf814b
This is to keep the visibility of this issue, some customers ask for very detailed customizations, in which at times, we need to replicate the conditions of the relation of a field to be viewed through a method different than a Standard Page, using ControlAddins for example.
Missing the filter definition information blocks us from developing in this direction, so it would be greatly appreciated if it could be added to "Table Relations Metadata", alternatively making the object metadata accessible would be ok, albeit more complex.
Comments
The performance of looping through the table "Table Relations Metadata" must be improved too.https://www.yammer.com/dynamicsnavdev/threads/3083002047127552
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