Hi! Could anyone help me with some information ? I instaled Navision Attain 3.6 w SQL Server database. Everything is ok except for the security filters. [V] They just dont work ! If I set a filter, when the user tries to access the table with the filter he gets an error message saying that he doesn
t have read permission and should contact the system admin etc etc. The funny part is that this doesnt happen in all the forms![:p] I tried with all kinds of filters : with exact filters, with * etc. They don
t work. Could anyone please tell me what can be done ? Is there a hot fix or anything ? Or am I doing something wrong ? 10x in advance [;)]
Only for understanding: The user can see the data of the table through a form and if you then set a filter, you get the error ?
Its very important that you obtain one of the Hotfixes for 3.60 - I think 13 but I forget - because there are several fixes in it for Record Level Security (RLS) that might solve your issues. There are two principles in RLS. 1. A permission error will be raised whenever C/SIDE is about to perform an action on a record which is outside the user’s security filter for that action; e.g. to read a record outside the security filter for the read permission. But it could also be an insert, etc. 2. This is really a relaxation of (1). When viewing data in forms, C/SIDE will internally apply the read security filter to the UI, combining it with any other filter (set by the user or C/SIDE) which will mean that the user will only see records he has permission to see. Therefore no error occurs. If, however, you are getting a permission error in a form, it means that C/AL code is running which is not respecting the security filter. C/AL cannot just place a filter and perform an operation - that filter might conflict with the permission filter for the user. If this is not error-trapped you could get incorrect data due to a modified filter. Therefore an error is raised. The C/AL function SETPERMISSIONFILTER is used to combine the security filter with the C/AL filter, avoiding an error. But you must be sure that the resulting filter will not cause problems. This is not what everyone expects of the behaviour, but is the safe approach to maintain application consistency. Finally, wildcards in filters are not supported in RLS.
quote:
Originally posted by iammicky
Only for understanding: The user can see the data of the table through a form and if you then set a filter, you get the error ?
Nono! When I say filter Im not talking about field,table or any other filter. The security filter is my problem (and others
s too…)
quote:
Originally posted by robertc
Its very important that you obtain one of the Hotfixes for 3.60 - I think 13 but I forget - because there are several fixes in it for Record Level Security (RLS) that might solve your issues. …
I know what NA should do…but thats just it! It doesn
t do it! [:)] Its too bad that I can
t use wildcards.They would really come in handy. I didnt modify any C/AL code (at least not in the forms that I
m talking about-with the errors) so it must be a NA bug, right? I have all the hotfixes I guess… Im gonna start diggin
for the right one [:D] 10x a lot for the answers. Has anybody encounter the same problem ever?
If you have the latest hotfix then yes, this is a Navision application code problem. The application is not prepared for arbitrary security filters. You can use the Client Monitor to help to determine where in the code the error is thrown because you will see the C/AL location prior to the error message. Debugging may take longer.
i encounter similar problems… I first defined a Security filter on a field of a table in the permission form. (a TABLEDATA type) when I use a simple Card-type Form associated with this Table, everything is ok : i got the filters, no error… Then I tryed to add a Sub-form with a sub-form link. The subform refer to an other table without any security filter. If a field of this ‘sub-table’ (used to link the forms) has the “validate table relation” propery set to yes, the main form is not working, returning an access error (about the main table!). When debugging using the client monitor, we can see that after opening the sub-table, Navision make an other acces to the main table without any security filter applyed (but just the link with the main table)…that should be the origin of the prob… bugg or not bugg ??? Same problem with Flowfields using a table with a security filter applyed! PS: i am using v3.70 FR(< bad english writer:)) with hotfix 10 !
quote:
Originally posted by coslau
i encounter similar problems… I first defined a Security filter on a field of a table in the permission form. (a TABLEDATA type)…
I see… So how did you solve it ? Or… did you ? [:D]
hum… in fact… i did not in my case… but it is possible to remove the subform link and make a subForm.SETTABLEVIEW in the OnAfterGetRecord… An other solution is to remove the validate tablerelation of the linked field in the sub-table… I did not see any solution for the flowfields(EXIST) error… waiting for the v4 of Navision !!