Permanent Filters On a Page in Nav 2016

omyvadiyaomyvadiya Posts: 106Member
I am trying to filter a Lookup of a Page via writing code on OnLookup trigger of the Field, its working fine, i.e; when the page is opened, it opens with the filtered data, but here the problem is user can clear filters.
Is there any way to have permanent filters whenever the page is opened.
For Eg: I want to open Item Ledger Entry Page with filter of

1. ILERec.SETRANGE("Item No.","No.");
2. IF UserSetupRec.GET(USERID) THEN;
ILERec.SETRANGE("Location Code",UserSetupRec."Location Code");

A workaround i think is that, i have to somehow remove the clear filter option from the Page.

Thanks in Advance.

Best Answer


  • DuikmeesterDuikmeester Hoorn, The NetherlandsPosts: 290Member
    edited 2019-03-19
    ILERec.SETRANGE("Item No.","No.");
    IF UserSetupRec.GET(USERID) THEN;
    ILERec.SETRANGE("Location Code",UserSetupRec."Location Code");
  • omyvadiyaomyvadiya Posts: 106Member
    edited 2019-03-19
  • omyvadiyaomyvadiya Posts: 106Member
    Hi @Duikmeester ,
    Thanks its working :)

    But, i have a problem, that the lookup is showing the value as 0, if it has some value too. PFA.

    I know, it has to somehow work with Flowfield, any suggestions, how can i achieve it.

    Requirement- If there is any inventory at the location defined in Usersetup.Location code, then the count of the that inventory must show and on lookup the list of the same must show.

    Thanks in Advance

  • omyvadiyaomyvadiya Posts: 106Member
    Hi @Duikmeester ,
    The count of inventory is still 0, on lookup it is opening with correct location filter although.
    Any idea about flowfilters?
Sign In or Register to comment.