Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Lookup on field in request page

Posted on by 543

Hi,

I'm new to NAV, and for the first time, I have made a request page for a new report in NAV 2009.

In the request page, the user can enter a filter on item numbers. The entered value is saved in a text variable, I use later on.

I would like to add a lookup arrow to the field, but nomatter what I do, there is no lookup arrow.

How do I make my text variable ("ItemFilter") lookup to Item."No."?

*This post is locked for comments

  • Morten Steengaard Profile Picture
    Morten Steengaard 543 on at
    RE: Lookup on field in request page

    Hi Stefano,

    Thanks a lot for your code. I'll save that in my knowledgebase.

    It turned out that I didn't know the difference between Request Form and Request Page in NAV 2009. All my changes on the page didn't help because I used the form. Now everything works, just by setting some properties on the field in the form instead of on the field in the page.

    But I appreciate your time and work!

    Best regards, Morten

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: Lookup on field in request page

    You can set the TableRelation property of this field to the Item table or you can write a custom lookup logic in the OnLookup trigger of your field. Something like:

    ItemList.SETTABLEVIEW(Item);

    ItemList.LOOKUPMODE(TRUE);

    IF ItemList.RUNMODAL = ACTION::LookupOK THEN

    BEGIN

     ItemList.GETRECORD(Item);

     Text := Item."No.";

    END;

    where:

    Item: Record "Item";

    ItemList: Page "Item List";

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans