Permission Question

bhalpin
Member Posts: 309
Hi.
This is NAV 4.0 on NAV server.
The item table/card is heavily modified, and there are a series of new fields with a lookup form to choose values from.
I am trying to get this configured so that 'User A' has read access to the item table, but can change the values in the new fields (only) through the lookup form associated with those fields.
The user has been gived read access to the item table, and that prevents changes as expected. Then I set the permission property of the lookup form to give it write-access to that table.
But, when I tested it by logging in as that user and clicking F6 to choose a value, I still got the error that they are not allowed to make changes to the Item table.
So I tried changing that user'sr write access to the item table from '' to 'Indirect', but still it's no-go.
Is what I'm attempting possible? If so, what have I messed?
Thanks in advance.
This is NAV 4.0 on NAV server.
The item table/card is heavily modified, and there are a series of new fields with a lookup form to choose values from.
I am trying to get this configured so that 'User A' has read access to the item table, but can change the values in the new fields (only) through the lookup form associated with those fields.
The user has been gived read access to the item table, and that prevents changes as expected. Then I set the permission property of the lookup form to give it write-access to that table.
But, when I tested it by logging in as that user and clicking F6 to choose a value, I still got the error that they are not allowed to make changes to the Item table.
So I tried changing that user'sr write access to the item table from '' to 'Indirect', but still it's no-go.
Is what I'm attempting possible? If so, what have I messed?
Thanks in advance.
0
Answers
-
Hi,
Lookup (standard, no custom C/AL code) is function which allows you to pick a value from another table. Has nothing to do with modifying record in current table.
When you lookup for anything the value is picked from related table and put into field. Nothing more happens. then when you press Enter or leave field a VALIDATE is launched on the field. At that stage there is no MODIFY to the table, so you can actually select and put new value regardless of your rights to underlying table, unless OnValidate trigger tries to modify record.
Then when you move to next record MODIFY is fired. At that point permissions are checked/enforced, and it doesn't matter what was used to change field value... lookup or just typing, or even only pressing F2 and then enter.
Workaround is to write OnLookup code (in another codeunit) which pick and modify field you want, and also launches MODIFY on Item record, and give that codeunit right to modify Item table, and grand user indirect right to modify Item table.
Hope this helps.
SlawekSlawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-030 -
Hi Slawek.
Yes, that helped. All is clear now.
Bob0
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