Skip to main content

Notifications

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,296 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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,030 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans