- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2017 10:30 AM
Any idea how to call isMemberOf() from client side (onLoad) or any alternatives ?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2017 10:39 AM
Hi,
You can write a Display Business Rule on the required table and store the value in Scratchpad variable as mentioned below:
g_scratchpad.grp = gs.getUser().isMemberOf(''); //Mention the name of the Group you want to check
Based on this scratchpad value you can check on the client side as required:
if(g_scratchpad.grp =='true')
{
......Write your validations here as required
}
Hope this helps.Mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2020 01:21 PM
HI Sholke
How can we do it for a catalog item. Like I have a catalog item and there is a field which I want to be read only for all other users and be allowed to change if the user is a member of a particular group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-29-2021 05:17 AM
how to do on onchange ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-29-2021 05:17 AM
how to do on onchange ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2017 10:40 AM
Hi,
You can also use it in script include and call that script include in client script using glide Ajax..
http://wiki.servicenow.com/index.php?title=GlideAjax#gsc.tab=0
http://wiki.servicenow.com/index.php?title=Script_Includes#gsc.tab=0
Mark Correct if it solved your issue or hit Like and Helpful if you find my response worthy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2019 10:42 AM
I think what you are suggesting is what i am looking for. I have a variable (from variable set) on a service catalog that should be visible only to a group's members. The link above does not work anymore. Do you have any more details?