check if logged in user has end user role using client script
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2018 12:35 AM
Hi Friends,
Could someone please let me know, how can I check if logged in user has end user role using client script ?
THank you.
Rishi
- 14,004 Views
6 REPLIES 6

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2018 03:01 AM
Hi,
Use g_user.hasRole('name of role'); in client script

Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2018 03:20 AM
Hi Rishi,
Refer the folowing link, You will find solution for all role related issues.
Thank You
https://developer.servicenow.com/app.do#!/api_doc?v=jakarta&id=r_GlideUser-hasRole_String