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...
Suggested answer

Can't lookup Dimension values base on dimension the select Dimension Code

(0) ShareShare
ReportReport
Posted on by

Hi all

Can't lookup Dimension values base on dimension the select Dimension Code. An error placing the breakpoint on  "Dimension Value".Get("FNo."); below shows up.Below is my code.

Field(50013; "FNo."; Text[30])
{

Caption = 'Fund No';

//DataClassification = ToBeClassified;
//TableRelation = Fund."No.";
TableRelation ="Dimension Value".Code where ("Dimension Code"= filter('FUND'));


trigger OnValidate()

var
"Dimension Value": Record 349;

begin

"Dimension Value".Get("FNo.");
FundName := "Dimension Value".Name;
//"FNo.":="Dimension Value".Code;

end;

}

Kindly assist

  • Community Member Profile Picture
    on at
    RE: Can't lookup Dimension values base on dimension the select Dimension Code

    1) You can use OnLookup of the Editbox to enter the code to open the lookup form and select the value

    2) You can use TableRelation property of the editbox to connect it to specific table (bat you cannot include filter based on some settings or another variable).

    I recommend the first option...

  • Suggested answer
    JAngle Profile Picture
    89 on at
    RE: Can't lookup Dimension values base on dimension the select Dimension Code

    So you want the name of the fund from the dimension value table? I would try changing FNo to a code[20] as .get likes to have matching field types and primary key values only. I expect the primary key of the dimension value table is more than what you have. The alternative would be to use .setrange instead, so you don’t have to comply with the primary key of the table.

  • Suggested answer
    Andy Sather Profile Picture
    on at
    RE: Can't lookup Dimension values base on dimension the select Dimension Code

    Hello  - We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist.  If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    dynamicsuser.net/.../developers

    I will open this up to the community in case they have something to add.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

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

#1
YUN ZHU Profile Picture

YUN ZHU 290 Super User 2025 Season 1

#2
Mansi Soni Profile Picture

Mansi Soni 196

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 156 Most Valuable Professional

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans