- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2018 01:56 PM
Ui Action: Assign me
if(gs.getUser().isMemberOf(current.assignment_group));
{
current.assigned_to = gs.getUserID();
}
if he is not a member in that group then popup message
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2018 12:29 AM
Hi,
Try using the below script in UI Action with Client field checked.
Onclick: onClicking()
function onClicking()
{
var gr = new GlideRecord('sys_user_grmember');
gr.addQuery('user',g_user.userID);
gr.addQuery('group',g_form.getValue('assignment_group'));
gr.query();
if(gr.next())
{
g_form.setValue('assigned_to',g_user.userID);
}
else
{
g_form.addInfoMessage('Looged-in user is not a member of the selected Assignment Group');
}
}
Hope this helps.
Thanks,
Archana

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2018 07:15 AM
Glad to hear that 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2018 08:59 AM
Can you help me in this Thread please
How to Stop Duplicate Record creation: https://community.servicenow.com/community?id=community_question&sys_id=8b17ce76db7597007b337a9e0f9619e5,