How to set modify permission to a field (super user)

mtlmonkmtlmonk Member Posts: 48
Hi,

Under 2013, how would you set the permission to modify a field to only super users?

Would like to have a field added to the sales invoice line but only super users would be able to modify it.

Thanks in advance.

Best Answer

Answers

  • AirSolutionsOnAirSolutionsOn Member Posts: 3
    I am using NAV 2013
  • mtlmonkmtlmonk Member Posts: 48
    I am using NAV 2013

    Ok, and? How do you do it?
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    you can check in Onvalidate trigger of field whether user is a Super user or not. if not, through error
  • vaprogvaprog Member Posts: 1,140
    That depends on the level of security you require.

    On a page, set up a variable that you can use on the Enabled property of the control. OnOpenPage calculate the value of the Variable.

    OnValidate of the field in the Table you can do a check and issue an error. The scope of this check is more global, but the user gets an error only after he entered a value on the page.

    To determine the rights, the easiest thing to do is choose a table, to which only SUPER has access and use READPERMISSION/WRITEPERMISSION.
    If you must check for the SUPER role, the whole thing gets version specific and depends on the type of login. Anyway, your starting point is USERID and your end point ist the system table containing the Roles/Access Control. (or better, actually, the table Permission)
  • mtlmonkmtlmonk Member Posts: 48
    you can check in Onvalidate trigger of field whether user is a Super user or not. if not, through error

    Yes, that was the plan but how do you check if a user is super in c/al code?
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    you have to get that from 2000000053 table using User Security ID
Sign In or Register to comment.