Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

All* Action on lists removes all filters including fields in a specific filtergroup

Posted on by 162

We had code which filtered the G/L Entries by dimension and applied a filtergroup to this, example below. 

GLEntry.Reset();
GLEntry.SetCurrentKey("Posting Date", "G/L Account No.", "Dimension Set ID");
GLEntry.FilterGroup(100);
GLEntry.SetFilter("G/L Account No.", GLAccountFilter);
GLEntry.SetFilter("Dimension Set ID", DimensionSetIDFilter);
Page.Run(Page::"General Ledger Entries", GLEntry);


However, we noticed that users can simply press the "All" button and this will remove all the filters at it essentially reopens the page. We cannot add this restriction to the OnOpenPage.

What is the new method now to ensure users cannot remove filtergroup permissions?

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,647 Super User 2024 Season 2 on at
    RE: All* Action on lists removes all filters including fields in a specific filtergroup

    As you know, this should be easy to do if it can be added to the OnOpenPage trigger.
    More details: https://yzhums.com/8427/

    How about using Security Filter?

    pastedimage1683679438439v1.png

    pastedimage1683679455275v2.png

    Hope this can give you some hints.

    Thanks.

    ZHU

  • TESDEveloper Profile Picture
    TESDEveloper 162 on at
    RE: All* Action on lists removes all filters including fields in a specific filtergroup

    Note: We Reset the FILTERGROUP before opening the page in the real example.

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans