Restrict a user accessing a particular field

ananthanathan
Member Posts: 20
hi,
I need to know if the following is possible using the SQL server option for Navision Attain
The Sales person incharge should be able to see all the information in a sales order.
But the Data entry operator who enters all the order information should not be allowed to view those price information.
Can this be made possible. Please help.
Thanks in advance.
Anantha
I need to know if the following is possible using the SQL server option for Navision Attain
The Sales person incharge should be able to see all the information in a sales order.
But the Data entry operator who enters all the order information should not be allowed to view those price information.
Can this be made possible. Please help.
Thanks in advance.
Anantha
Regards,
Ananthanathan.G
Ananthanathan.G
0
Comments
-
hi,
a quick solution but with some code is to create a code where the sistem open two differents form for two different user or type of user.
Another solution is modify the proprierty of control for different user or type of user but not the property "visible" because this property could be change manualy by user.
I don't know if there are more solution in sql database but in navision db you couldn't give permission to field but only to table.0 -
I solved it this way:
Is OnOpenFormGroups.SETRANGE(Groups."User ID",USERID); Groups.SETRANGE(Groups."Role ID",'SALES'); IF (Groups.FIND('-') ) OR (userlevel = userlevel::Sales) THEN BEGIN CurrForm."Currency Code".visible := false; CurrForm."Any_Field_Name".editable := false; END;
This must be done in the form. You can set access limits (I've done it with the classic database)
I can imagine a similar solution set in the "OnValidate Field" or in the "On Modify" section of the table.0 -
Sorry, Christian, but this is not a solution because the user can set this fields visible.
If you want to do so, you must check the permissions in OnActivate-Trigger of the form too and restrict the users rights so he can't use the "Zoom".Timo Lässer
Microsoft Dynamics NAV Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]0 -
Timoi you are right,
the visible proberty enables still viewing with the F8-zoom
I used only the editable property in my code and figured out how to put unneccessary data out of the general view and focus users on the data they need.
To really protect against unwanted views, you have to do it like you said.0 -
What is the code necessary to restrict zoom on a particular form?Beth Hagan0
-
You cannot restrict the zoom for a specific form.
You only can setup whether the user has the permission or not.
In this case, you must restrict the user permissions so that he cannot show the zoom.
Furthermore you must ensure by C/AL code that the user doesn't show the specific fields.
Sample:OnActivateForm() IF NOT UserSetup."Show Unit Cost" THEN CurrForm."Unit Cost".VISIBLE := FALSE;
What happens?
- The user (who has no permissions to the field "Unit Cost") doesn't see this field.
- He want to show this field and select it via the Menu.
- After he returns from the "Select Columns" dialog, he (re)activates the form (That's the behavior of Navision).
- This form now wants to display the field "Unit Cost".
- The code in this form hides the field still before the window is updated.
Result: The field will never appear.
Note: This is not the same asOnActivateForm() CurrForm."Unit Cost".VISIBLE := UserSetup."Show Unit Cost";
because the users (with permissions to the field) should be able to hide it (if they want).Timo Lässer
Microsoft Dynamics NAV Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]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