web
You’re offline. This is a read only version of the page.
close
Skip to main content
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
    Inge M. Bruvik Profile Picture
    1,071 Moderator on at
    RE: I get an error when I use table relation with filters

    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
    RE: I get an error when I use table relation with filters

    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;

    }

  • Community member Profile Picture
    4 on at
    I get an error when I use table relation with filters
    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
    I get an error when I use table relation with filters
    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
    I get an error when I use table relation with filters
    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
    I get an error when I use table relation with filters
    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

Responsible AI policies

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

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,705

#2
Sumit Singh Profile Picture

Sumit Singh 2,015

#3
YUN ZHU Profile Picture

YUN ZHU 2,004 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans