disabling modifications from GUI

Eugene
Member Posts: 309
i was asked to disable modifications (inserts and deletes included) to the table from user interface (i named it GUI here) and allow changes to be made only from the programming code ( in reports codeunits etc).
I have heard one could utilize CurrfieldNo variable to distinguish between two . Is it correct ? Is this method used ? I find it to be a bad idea and would prefer to use set-access functions in table object and disable any modifications by deafault - whoever wants to modify the table will have to use set-access functions.
I have heard one could utilize CurrfieldNo variable to distinguish between two . Is it correct ? Is this method used ? I find it to be a bad idea and would prefer to use set-access functions in table object and disable any modifications by deafault - whoever wants to modify the table will have to use set-access functions.
0
Comments
-
How about taking away insert and modify permissions on the tables from users and give them to the navision objects (using permission properties)?0
-
The most standard way would be leveraging Navision various ways of addressing security (what's on the menu, and permissions).
Only give users indirect access to tables.
Very strange request though. Are you creating some sort of archive for your users?0 -
There are the ways how you can do that. Select the most appropriate for your situation:
1) Modify all forms working with the table and set EDITABLE to no (or property AllowInsert, AllowDelete, AllowModify) - it is working for all users and it means the SUPER user is not allowed to change the data through forms too
2) Assign just indirect permissions to the users for insert/delete/modify and add permissions into the object properties of the codeunit/report which are changing the data. - you can set the permissions just for some set of users and allow others to edit what they want
3) Make a special set of forms for the limited users and use way no. 1 for them. But you need to do changes everywhere the forms are called...
For me the way 2 looks like best one... ;-)0 -
It could be a solution, to add a global boolean variable to the table (ModifyAllowed), and a function, to set the value of this variable (SetModifyAllowed). After you can add code to OnInsert, OnDelete, OnModify triggers, to test this value.
From GUI, users could not set this variable, but you can do it with the SetModifyAllowed function.
The other solution could be, to add an ERROR('') to the OnInsert, etc. triggers, and from CAL you can call INSERT(FALSE), but it only works, if you have no necessary funcions implented in these triggers.0 -
sorry, i forgot to mention that the data access should be read-only or read/write based on the values of the certain fields.0
-
Than you need to add code to each form or into OnModify etc. but you need to make difference between calling from code and by user by setting some flag in code...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