- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 06:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2023 12:54 AM
Hi @SAS21,
Try this updated view rule scripts:
(function overrideView(view, is_list) {
var role = gs.hasRole('x_sb_nw_bu_analyst');
if (is_list && role) { // if it's a list and has required role
answer = "vendor"; // set the new view to answer
} else // if it's not a list, in other words, on a form
answer = ""; // "" is for default view
})(view, is_list);
For your reference: KB0723494
If my response helps to solve your issue. Kindly mark it as helpful & correct. It will be helpful for future readers.
Thanks,
Sagar Pagar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 06:39 AM
You can add roles to UI Views that specify which roles can access that view.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 06:39 AM
Hi @SAS21,
I would suggest to create a view rule on table with conditions instead of ACL.
Take a look at this docs: Create a view rule
If my response helps to solve your issue. Kindly mark it as helpful & correct. It will be helpful for future readers.
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2023 01:43 AM
Hi @SAS21,
Have you look at my comments? Let me know if have any queries.
If my response helps to solve your issue. Kindly mark it as helpful & correct. It will be helpful for future readers.
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2023 02:22 AM
Hi Sagar,
Yes, i tried this way but its not working when user tries to open record from a reference field info icon
(function overrideView(view, is_list) {
// Add your code here
var role = gs.hasRole('x_sb_nw_bu_analyst');
if (role) {
answer = 'vendor';
}
})(view, is_list);
Am i missing something ? The requirement is the specified role open the record from reference fields - it goes to default view . Need to change that to vendor view
Thank you for your time