VA Topic should be visible based on logged in user role
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 03:39 AM
Hello
I want to hide the VA topic if user don't have an 'snc_internal' role.
I have tried below approach
(function execute() {
var udc = new GlideRecord('sys_user_role');
udc.addQuery('sys_id','7fcaa702933002009c8579b4f47ffbde');
udc.query();
if(udc.next()){
return true;
}
else {
return false;
}
})()
But this is not working as expected.
Thanks!
10 REPLIES 10
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 11:21 PM
Hi @divya216 ,
After saving the script save the Topic and Published it then clear the cache and open a new browser window and then check. I tried this and it is working for me. Don't continue the same session. Try this in a new session.
Please Mark My Response as Correct/Helpful if it helped.
Regards,
Badal Khojare
Community Rising Star 2023
Regards,
Badal Khojare
Community Rising Star 2023