I'm building a form where the user selects an employee in a lookup form and I would like to link it to the employee table so I don't need to maintain a separate list of employees. But even when I've created a lookup form with 2 fields of the employee table listed, the filter function can be used to guess at the values of other fields in the employee table. I also don't think it's a good idea or good practice to give permission to the employee table to low level employees at all.
Anyone have any alternative solutions for me?
Is there any way to set read permissions on individual fields of a table?
0
Answers
if i understood it correct, you have a new list form with 2 fields (No, Name) to select an employee. But the user haste the possibility to use the table filter (Ctrl+F7) to open the default employee list and then to open the employee card. And here, on the standard list / card, are fields that should not be shown for the user. correct?
So, if it is so, you can create your own List and Card that is used for F5 / Shift + F5 or you write C/AL code in the onopenform trigger to check if the fields are visible or net based on the permissions, or u define the user permissions instead based on table data to forms, report, table, and so on. <- But this is a lot of and hard work.
Thanks for the response. I have already created my own permissions and if both the employee table and table data permissions are not given, the user cannot access the lookup form.
The user cannot access the employee card or view the employee table directly, but even access to the filter area (of the 2 field lookup form) allows them to filter by Social Security Number and guess the first number by typing 1*,2*,3*,etc. If a employee is found at 3*, they can type 31*,32*,33*,34*,etc. to guess the second number and so on until they find the entire number.
Is there any way to eliminate access to this field or deny access to the filter function on a specific form?
Or, am I stuck with creating a new employee table (for basic, low security information) and if so how should I go about it so it will always have up to date information?
Updates for
OnInsert
SecondaryTable.No := Employee.No;
"Fill in any needed info"
SecondaryTable.Insert;
OnModify (for the fields that you want on the secondary table)
SecondaryTable.get(rec.No);
"Update needed fields"
SecondaryTable.Modify;
OnDelete
SecondaryTable.get(xrec.No);
SecondaryTable.delete;
IF rec.GETFILTER(SSN) <> '' THEN BEGIN
rec.SETRANGE(SSN); //To clear the filter
MESSAGE('You cannot set a filter on SSN!');
END;
My Blog - nav.education
Take a look at Lanham's field level security. Ask your partner about it.