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

I get an error when I use table relation with filters

(0) ShareShare
ReportReport
Posted on by 29

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?

  • Suggested answer
    Hallister Profile Picture
    Hallister 2 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
  • 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
  • Muaaz Deyab Profile Picture
    Muaaz Deyab 29 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;

    }

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 997 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?

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,430 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans