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

Announcements

No record found.

News and Announcements icon
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,269 Super User 2026 Season 1 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,821 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,122 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 959 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans