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...
Active Discussion

Security Filters - show totals but hide data

(0) ShareShare
ReportReport
Posted on by 5

Hello,

I wanted to share the way to show totals when using SecurityFilters in NAV. Normally security filters process filters on sql layer and push them to NAV. 

Sometimes there is need to only hide so here is some example how to do it.

On trigger OnAfterGerRecord create local record which corresponds Rec like follows:

//Check SECURITYFILTERING of REC

IF "SECURITYFILTERING" = SECURITYFILTER::Filtered THEN BEGIN

//SET SecurityFilter to Ignored
lreGLAccount."SECURITYFILTERING" := SECURITYFILTER::Ignored;
lreGLAccount.SETAUTOCALCFIELDS("Net Change",Balance, "Balance at Date",
"Debit Amount","Add.-Currency Balance at Date",
"Additional-Currency Balance", "Additional-Currency Net Change",
"Credit Amount");
IF lreGLAccount.GET(Rec."No.") THEN BEGIN

//Parse CalcFields to Rec from local record
"Net Change" := lreGLAccount."Net Change";
Balance := lreGLAccount.Balance;
"Balance at Date" := lreGLAccount."Balance at Date";
"Debit Amount" := lreGLAccount."Debit Amount";
"Add.-Currency Balance at Date" := lreGLAccount."Add.-Currency Balance at Date";
"Additional-Currency Balance" := lreGLAccount."Additional-Currency Balance";
"Additional-Currency Net Change" := lreGLAccount."Additional-Currency Net Change";
"Credit Amount" := lreGLAccount."Credit Amount";

//do not use modify here!

END;
END;

The result is as expected, when you drilldown on flowfield the data behind would be hidden.


Do you have any other walkaround? 

  • Marco Mels Profile Picture
    Microsoft Employee on at

    Hello,

    We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist. If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    www.dynamicsuser.net/.../14

    I will open this up to the community in case they have something to add.

    Thanks.

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

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 728 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 545 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 328 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans