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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Filter OnOpenPage

(0) ShareShare
ReportReport
Posted on by

Hi,

Customer have ALOT of items, but they only use about 1000 of them manually and the rest is used though webservice and automaticed processes.

So ect. when on a sales order it can be really slow sometimes to search for a item because there are so many to search though.

I have onOpenPage (page Item List) made a setrange on the 1000 items i want to show, but this will effect everwhere that the item list is used, can this be done so it will only happend on sales orders for example?

What I had in mind was to create a function on Item List page with a boolean variable that only will set this to true.

SetBooleanTrue()
BooleanVar := True;

OnOpenPage
If BooleanVar = TRUE THEN
SETRANGE(MYSETRANGE, SETRANGE);

On Sales Order page I will call SetBooleanTrue() and i will get the right filter.

I tried this but its not working. Any hints on getting this to work only from ect. sales order and not affecting everywhere you use item list? 
Thanks in advance.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Youssef M Nasser Profile Picture
    20 on at

    Hello Christopher,

    I believe that perhaps there's a better approach but you can try the following:

    Create a CodeUnite and set the "SingleInstance" property to yes, this will make all codeunit variables that use this CodeUnite use the same instance.

    In this CodeUnite create a variable "BooleanVar" and create a function to set this var to true "SetBooleanTrue()" and false "SetBooleanFalse()".

    In the Sales Order (or any other sales document you want) call the SetBooleanTrue() function on open page and call the SetBooleanFalse() on close.

    On another hand, in the Item List page check this value, if true do your filter if not do nothing.

    I hope this could help you.

  • Verified answer
    Community Member Profile Picture
    on at

    If I understood you correctly you want to choose filtered item list only from Sales docs.

    May be the easiest way in this case is to modify Property "TableRelation" of the field "No." in table 37. Just specify filter for Type "Item"?

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans