Field Level Security

Nav_NoobNav_Noob Member Posts: 25
Hello,

Is there a way to set security permissions at a field level? I've added a field to the Customer Table (18) and added that field to the Customer Card Form (21). All users should have access to the Customer Card Form but only a few users should have the ability to modify the new field that I've added to the form. Is there a way to achieve this using NAV Security Roles? Is there a better way of achieving this? Any input would be a great help.

Thanks,
Adam

Answers

  • kapil4dynamicskapil4dynamics Member Posts: 591
    Ur db is on SQL or NAV's native ?
    Kapil Khanna
  • DenSterDenSter Member Posts: 8,305
    No standard NAV does not provide field level security, you set permissions on a table level.
  • kapil4dynamicskapil4dynamics Member Posts: 591
    But sql does if i am right, actually i did ask him for getting this to know.

    Sorry, i think we misunderstood again. :mrgreen: U remember some days back we had similar kind of confusion when somebody did ask for exam dumps LOL. In that post i almost ended up selling dumps. :mrgreen: LOL
    Kapil Khanna
  • ara3nara3n Member Posts: 9,256
    Nav does not have field level security as denster mentioned. Neither on sql or native.
    In sql you can filter records by some values, but that not field level security.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • jordi79jordi79 Member Posts: 274
    In NAV you can easily customise field level security on "who can modify a field", but not on "who can view the field".

    You can do this by customising on change log. In change log in NAV, each field changes will be logged in Change log entry. You then only need to write a code to check the Change Log Entry to see if the field to be checked is being modified. And just issue an error if the check fails.
  • kapil4dynamicskapil4dynamics Member Posts: 591
    But using sql i can give the rights where in if user tries to access some values(selected one) then system will throw the error. Though i agree it will work on values not on whole field. :oops:
    Kapil Khanna
  • ara3nara3n Member Posts: 9,256
    Navision does a select * on records. Also Nav uses application role to setup security. So I would advise against modifying it.
    the first thing that will happen is that nav will stop working.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • DenSterDenSter Member Posts: 8,305
    Kapil.... field level security means that you can manage rights per field, for instance in the Item table you could be able to set modify rights to the Description field, and read only rights to the base unit of measure.

    In standard NAV you can only set this level of permission on a full table level. Once you have modify rights on the Item table, you have that permission on all fields. You can set a filter in the security (for instance only Items with Item Category 123), but for the Items that are in your category, you can modify all fields.

    Standard NAV does not provide field level security. Not in Native and also not in SQL Server.
  • kinekine Member Posts: 12,562
    For this, as already mentioned, you need to use some addon or developed module (we have one, it is not problem to create as jordi79 described). Or if it is just some field, you can mdify triggers on the table to check if the user have "rights" to modify the field.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Nav_NoobNav_Noob Member Posts: 25
    Thanks to everyone for their helpful input. I'll look into what Jordi and Kine mentioned. Thanks again!
  • SavatageSavatage Member Posts: 7,142
  • themavethemave Member Posts: 1,058
    here is another add-on that does it

    http://www.costcontrolsoftware.com/F_C_Security.htm

    what we did, is make a new form, and only give the users who need to use access.

    the standard form, doesn't have the fields, this way no one ever gets to the new form, by navigation
  • eYeeYe Member Posts: 168
    Hi,

    I have written code that handles this. It basically uses the Change log management code, and checks if something is setup for a table by doing a OR between standard GetGlobalTriggerMask and the custom mask generated from the setup.

    Problem here is that OnGlobalModify only kicks off when writing the record away. Because if you say that you do not have permission to change field 4, but field 4 is filled in when validating field 1 - an error will be thrown when entering a value in field 1.

    I could not find a way to determine direct vs. indirect changes on field level in a generic fashion.

    Any ideas?

    Regards,

    Ewald
    Kind Regards,
    Ewald Venter
Sign In or Register to comment.