Permissions for Vendor Form

IrishGiri
Member Posts: 61
I want to allow only one user full read/write permission to the Vendor Card. All other users can only have read permissions to the info. conatined in the vendor card. What is the most elegant solution to this problem?
Permissions in Navision is something I'm not too clear on...
Thanx in advance!
Permissions in Navision is something I'm not too clear on...
Thanx in advance!
0
Comments
-
Hello,
Standard Nav has two roles (P&P-VENDOR and P&P-VENDOR, EDIT) that you can assign to your users and will do the job.
* P&P-VENDOR is for reading
* P&P-VENDOR, EDIT is for read/write
In case you don't have those roles, then restore a Cronus and study how are those roles where made regarding the Vendor table.0 -
I used the following code in the OnModify Trigger of the Vendor Table:
OnModify()
IF (USERID <> 'GERRY') AND (USERID <> 'ADMIN') THEN
ERROR('You do not have permission to edit this form');
Works ok now.
Thanx!0 -
Ok... hardcoded...
In that case you can use the following instead:Form - OnOpenForm() ActivateFields; CurrForm.EDITABLE(CurrForm.EDITABLE((USERID='GERRY') OR (USERID='ADMIN')););
But I strongly recommend not to hardcode like that...
You should avoid modifications when you can use standard functionality...0 -
You *really* shouldn't do it this way IrishGiri (nice name, by the way)
Down the road, coding permissions can be a huge pain to maintain. If at all possible (and its so easy to do in this case) standard Navision permissions should be used. Look at Arhontis' first suggestion.
Furthermore, if you are going code your way out, the standard way of doing this is modifiying the UserSetup table. Create a boolean field that indicated the users have editing rights, and then in the vendor onmodify trigger, check that field to determine what to do next.
Arhontis coding solution is also not recommended because it puts more code on the form. That can be a pain to find, and is becoming less portable with 5.0.
Short answer: don't do it!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