I know that this topic has been discussed here before and I am almost sure about the answer I'm gonna get. Still....here it goes.
Does anyone know how to replace/change the following code
CurrForm."VAT Registration No.".VISIBLE(NOT VisibleFields(23,FIELDNO("VAT Registration No.")));
into something like
CurrForm.FieldRef.VISIBLE(NOT VisibleFields(RecordRef,FIELDNO(FieldRef)));
The purpose is quite simple:
How to get a user configurable form without having to create severall forms just to hide some fields from some users. Plus, give the Customer the possibility to decide who and when to change these options, instead of having to wait for someone to come in and change or create new forms.
I am sure we all know that maintaining severall forms by user or role is not the best solution.
I create a table were the end-user define by USERID or by ROLEID to which TABLES and FIELDS we want to deny access to the user by hiding or disabling the certain fields on the form.
Although I manage to give a certain amount of control to the end-user to configure certain fields, all must be coded on the form.
So I am looking for a cleaner, easier way to achieve the same result with minor changes to the form. Ence my idea to use of RecordRef and FieldRef to call an outside routine that would return a boolean result, although I'm almost sure it's not possible to do.
Another way I've seen mentioned here is to use a similar approach to the Change Log. Although this might avoid certain users from changing some fields it won't prevent them from seing them and it's contents.
All ideas or suggestions to solve this issue are welcome.
0
Comments
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
So far I did it the hard way ](*,) ... coded all fields on each form, commented all fields not present on the form, created a table were the users can define the enabled and/or visible fields and it seems to work. 8)
The major anoyance of this solution is that whenever a field is added to one of the tables and to the form, I'll have to go in and code it.
And there are severall minor anoyances:
1. Either in card or tabular forms, if you place the same field more than once in the form, the enabled/visible properties will only affect the first instance of the field. :-k
2. In tabular forms, it is still possible for the user to unhide the hiden fields. And if they are smart (and they are) they can select all and cut & paste to excel. So it appears that the only way to avoid this is to removed the fields from the form. Hiding them isn't enough. :-k
3. Since this 'security' feature is based on the table fields, all form variables are not available for the users to setup the enabled/visible properties. :-k
Does anyone has a suggestion? :idea: :?:
Like it was said here before, if we are waiting for Microsoft to introduce new features to solve this... well....
Cheers,
jpjesus@netcabo.pt
1. Either in card or tabular forms, if you place the same field more than once in the form, the enabled/visible properties will only affect the first instance of the field. - Easy. I gave diferent names to each control and this way it's easy to manage them.
3. Since this 'security' feature is based on the table fields, all form variables are not available for the users to setup the enabled/visible properties. - For this one I manage to find a work around: Most times these form variables are somewhat connected with other field. So I made it dependent on the property set by the user to the field I connected the variable. :whistle:
jpjesus@netcabo.pt