Control permission on ledger entries based on user setup - NAV 2016

poppins
Member Posts: 647
Hi everyone,
I have the following request from a customer:
Based on a boolean on user setup, the user should/should not be able to "see" Vendor ledger entries:
for example: when the boolean is off:
- The user gets nothing when he tries to access the vendor ledger entries from vendor card.
- The Vendor ledger entry list shows empty.
- .....
Is this achievable in NAV 2016?
I have the following request from a customer:
Based on a boolean on user setup, the user should/should not be able to "see" Vendor ledger entries:
for example: when the boolean is off:
- The user gets nothing when he tries to access the vendor ledger entries from vendor card.
- The Vendor ledger entry list shows empty.
- .....
Is this achievable in NAV 2016?
0
Answers
-
Yes, you could add some code to the OnOpenPage() trigger of the "Vendor Ledger Entries" Page (29) to set a filter which would return no records, make sure you do this in a FILTERGROUP though so that the user cannot clear the filter. It would be something along the lines of...
IF NOT UserSetup.GET(USERID) THEN CLEAR(UserSetup); IF NOT UserSetup."Allow Access to Vendor Ledger" THEN BEGIN FILTERGROUP := 10; SETRANGE("Entry No.",-1); FILTERGROUP := 0; END;
0 -
Yes, you could add some code to the OnOpenPage() trigger of the "Vendor Ledger Entries" Page (29) to set a filter which would return no records, make sure you do this in a FILTERGROUP though so that the user cannot clear the filter. It would be something along the lines of...
IF NOT UserSetup.GET(USERID) THEN CLEAR(UserSetup); IF NOT UserSetup."Allow Access to Vendor Ledger" THEN BEGIN FILTERGROUP := 10; SETRANGE("Entry No.",-1); FILTERGROUP := 0; END;
OK, but why FILTERGROUP := 10?
Why not FILTERGROUP := 2?0 -
You could but I prefer to use one that is not used internally by the client - just my preference.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions