- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2023 08:59 PM
Hi all,
I have a requirement to restrict writing on a field when the currently logged-in user does not have BOTH A and B roles.
The table has the application scope as 'Global' but the field has the application scope as 'NVT'. Also, there is another table using this field.
I have created an ACL with application scope as 'NVT' and written a script:
answer = gs.hasRole('A') && gs.hasRole('B') ? true : false;
but when saving then appear error messages:
Error 1: Invalid 'Access Control' record even though the selected outside table 'Computer' is allowed. A field level Access Control on an outside table cannot contain script. Only roles and conditions are allowed.
I would like to ask if is there a way to solve this error or if is there any other idea/solution to implement this.
Appreciate all of the help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2023 09:20 PM
Hi @Tuan Pro1,
As per my understanding, the table and its fields should be in same application scope.
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2023 09:05 PM
Hi @Tuan Pro1,
Try ACL by creating in Global scope.
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2023 09:12 PM
Hi @Sagar Pagar ,
I've tried and got the error message
"Invalid 'Access Control' record even though the selected table is in the current application. A field level Access Control cannot protect an outside field. The field is in application 'NVT', but the current application is 'Global'."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2023 09:20 PM
Hi @Tuan Pro1,
As per my understanding, the table and its fields should be in same application scope.
Thanks,
Sagar Pagar