Field-level security
Field-level security does not exist out of the box in NAV and is not easy to implement. In fact, a real field-level security is impossible to implement. This recipe will show you an example of how to quickly create a work around this type of security model in your system.
How to do it...
Create a new table from Object Designer of the name
Field Level Security
.Then add the following fields:
Name
Type
Length
Table No.
Integer
Field No.
Integer
Applied To
Code
50
Editable
Boolean
Visible
Boolean
Set the following properties for these fields:
Field name
Property
Value
Table No.
TableRelation
Object.ID WHERE (Type=CONST(Table))
Field No.
TableRelation
Field.No. WHERE (TableNo=FIELD(Table No.))
Applied To
TableRelation
User."User Name"
Applied To
NotBlank
Yes
Applied To
ValidateTableRelation
No
Applied To
TestTableRelation
No
Set the primary key for the table to
Table No.
,Field No...