web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

A bit of AL/syntax help please

(0) ShareShare
ReportReport
Posted on by 147

I have a table extension, which has a field I am wanting to validate against the list of dimensions available under Global Dimension 1. Here is a snippet of code where I am working this through:

Please note this is just for practise, not a production installation.

field(53003; "xDfltGlobalDim1"; Code[30])
        {
            TableRelation = "Dimension Value".Code where("Dimension Code" = field("Global Dimension 1 Filter"));
        }

However this produces a list of ALL dimension values setup for both 1 and 2.

I want to go to the General Ledger Setup table to find out what the Global Dimension 1 Code is, then use that to filter the results from the Dimension Value table.

I would expect to be able to do something like this (but of course it doesn't work like that!)

TableRelation = "Dimension Value".Code where("Dimension Code" = field("General Ledger Setup"."Global Dimension 1 Code"))

Any assistance appreciated.

I have the same question (0)
  • Verified answer
    Suresh Kulla Profile Picture
    50,243 Super User 2025 Season 2 on at

    You just need to set it like this

    TableRelation = "Dimension Value".Code WHERE("Global Dimension No." = CONST(1));

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,468

#2
YUN ZHU Profile Picture

YUN ZHU 923 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 607

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans