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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

I get an error when I use table relation with filters

(5) ShareShare
ReportReport
Posted on by 39

I get this error when I try to use table relation with filters 
Microsoft.Dynamics.Nav.Types.DBLazy  it is not the error itself but it is being inserted in the field instead of the value 
Can any one help me?

I have the same question (0)
  • Suggested answer
    IB-29041624-0 Profile Picture
    1,191 Moderator on at

    Maybe you can try to share your code, then it is easier to assist you in cases like this.

    Or at least elaborate a little more about what you are trying to do and from where?

  • Muaaz Deyab Profile Picture
    39 on at

    I solved this by using OnLookup trigger, still could not figure out what was the problem

    but here is the Code

    field(5; "Requester"; code[20])

           {

               DataClassification = ToBeClassified;

               TableRelation = Requester.OnBehalf where("User Name" = field(Preparer), Status = const(Approved));

               ValidateTableRelation = false;

    }

  • GA-27040922-0 Profile Picture
    4 on at
    What helped for me is to add this field to the page and then the error didn't happen anymore, could find other solution for this
  • Verified answer
    Hallister Profile Picture
    11 on at
    The error is still present in BC24.5.
     
    Steps for reproducing:
    Create a table field with a table relation to another table and to a field outside the primary key. The TableRelation must be set to false.
    Insert the field into a page object.
     
    Example:
    field(10; ‘Additional Field’; Code[10])
    {
        Caption = ‘Additional Field’;
        TableRelation = ‘Location’. ‘Additional Field’;
        ValidateTableRelation = false;
     }
     
    If you now try to make a selection via drilldown, you receive the error ‘Microsoft.Dynamics.Nav.Types.DBLazy’
    If you use the ‘Show full List’ function for selection, the expected value will be applied.
     
    Solution:
    The error can be avoided if the required field is added to the drilldown page of the corresponding table. The field does not even have to be visible.
     
    Example:
    pageextension 50000 ‘Location List’ extends ‘Location List’
    {
        layout
        {
            addlast(Control1)
            {
    
                field(‘Additional Identifier’; Rec. ‘Additional Identifier’)
                {
                    ApplicationArea = All;
                    Visble = false;
                }
            }
        }
    }
    I hope I was able to help you with this.
    Happy Coding
  • CU06030732-0 Profile Picture
    6 on at
    Today, I got the same error in BC25.4 – both OnPrem and Cloud. It's strange that, after all this time, it still poses a problem. I figured out exactly the same workaround and then found this thread. Nice to be confirmed ;-)
  • Suggested answer
    Mats Thell Profile Picture
    4 on at
    Sidenote; It is also enough that the field is included in the fieldgroup DropDown instead of DrillDownPageId.
    Thanks for pointing out what the issue was.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 563 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 374 Super User 2026 Season 2

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 331 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans