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...
Unanswered

Global filtering of Purchase Invoices based on complex user logic

(1) ShareShare
ReportReport
Posted on by 19
Hi everyone,

I’m trying to implement global visibility control for:
  • Purchase Header
  • Purch. Inv. Header

based on User Setup → Only Own Documents.

Logic (OR-based)
If Only Own Documents = TRUE:
A user should only see invoices that meet at least one of the following:
  • Invoice has at least one Item Line
  • User is the Purchaser (Purchaser Code)
  • User is the Approver
  • User is in the same Workflow Group

If none of these conditions are met → user must not see the invoice.

If Only Own Documents = FALSE:
User should see all invoices.

Attempt 1: Rec.Mark()
I implemented the logic with an EventSubscriber and marked allowed records per user.
This works functionally, but:
  • Not global
  • Does not apply to all pages/reports
  • No real data access restriction

Attempt 2: Security Filters
I extended the tables with fields like:
  • Has Item Line
  • Approver
  • Purchaser Code
  • Workflow Group

Then I calculated these values via a report and assigned per-user permission sets with Security Filters.

Issues (in my understanding):
Security Filters use AND logic, not OR → wrong filtering...

Attempt 3: Text-based filter field with Security Filters
I considered storing allowed users in an extended text field of these tables like:
USER1|USER2|USER3

And then define the Security Filter of its assigned user permission set like:
USER1
  
But (in my understanding):
Security Filters compare exact values, not dynamic...

Question
Is there any supported way in Business Central to achieve global filtering with:
  • OR logic
  • Multiple users per document
  • Custom logic

Thanks in advance!
I have the same question (0)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,822 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,136 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 956 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans