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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

How to restrict user to remove preset filter from a column on a list page in business central

(0) ShareShare
ReportReport
Posted on by 305

Hi

I have a list page in my BC extension where I have set a filter on the basis of employee no field. I want no user should be able to clear that filter on the column on the page in application. 

How can I do that? Please help.

Thanks in advance

Khudeja

  • Suggested answer
    Chameera Kavinda Profile Picture
    510 on at

    Hii khudeja,

    You can use Rec.FILTERGROUP(2) after you Filter the Records in the Page.

    Than you

  • khudeja Profile Picture
    305 on at

    Hi Chameera,

    Thanks for answering.

    However, I have used filtergroup(2) after filtering in the page. But it didn't fulfill my purpose. Can you please elaborate on how to use it? It would really help me.

    Thanks again

    Khudeja

  • ManishS Profile Picture
    86 on at

    You need to write as below, try and let me know.

    FILTERGROUP := 2

    Your code

    FILTERGROUP :=0

  • khudeja Profile Picture
    305 on at

    Hi Manish,

    Tried using this also, didn't work for me.

    I'm anxious what is going wrong with the code.

  • ManishS Profile Picture
    86 on at

    Can you show your code.

  • khudeja Profile Picture
    305 on at

    employeeTbl.SetFilter("AD user name", UserId);

                               if employeeTbl.FindFirst() then begin

                                   FilterGroup(2);

                                   AbsenceRegistrationTbl.SetFilter("Employee No.", employeeTbl."No.");

                                   if AbsenceRegistrationTbl.FindFirst() then begin

                                       SetTableView(AbsenceRegistrationTbl);

                                       SetRecord(AbsenceRegistrationTbl);

                                   end

                                   else begin

                                       SetTableView(AbsenceRegistrationTbl);

                                       SetRecord(AbsenceRegistrationTbl);

                                       Message('No record found');

                                   end;

                                   FilterGroup(0);

                                   exit;

                               end

                               ELSE begin

                                   AbsenceRegistrationTbl.SetRange("Employee No.", employeeTbl."No.");

                                   if AbsenceRegistrationTbl.Find() then begin

                                       FilterGroup(2);

                                       SetTableView(AbsenceRegistrationTbl);

                                       SetRecord(AbsenceRegistrationTbl);

                                   end;

                                   Message('Logged In User is not tagged with any employee');

                                   FilterGroup(0);

                                   exit;

                               end;

    **For your reference:--

    var

    employeeTbl : Record Employee;

    AbsenceRegistrationTbl: Record "Employee Absence";

  • khudeja Profile Picture
    305 on at

    Did you find a catch here? Please let me know if so.

    Thanks

    Khudeja

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 719 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 410 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 369 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans