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!

Report
All responses (
Answers (