show email client template option on the incident task form only for certain groups
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2023 12:09 AM
Hi experts,
I want to show email client for incident tasks where certain groups are selected.
For example, if group A, B or C are present as Assignment group on the incident task then only the email client option should be visible, else not. Is this possible?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2023 02:27 AM
Hello @Kalyani35
Greetings!
you can try below onload client script
var grpName = 'YOURGROUPNAMEHERE';
var usrID = g_form.userID; //Get current user ID
var grp = new GlideRecord('sys_user_grmember'); //i'm just using GR in Client script, you can use script include for better performance)
grp.addQuery('group.name', grpName);
grp.addQuery('user', usrID);
grp.query(groupMemberCallback);
function groupMemberCallback(grp){
//If user is a member of selected group
if(grp.next()){
$('email_client_open').hide();
}
}
you can also do this by ACL way:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0717937
Please hit the thumb and Mark as correct based on Impact!!
Kind Regards,
Ravi Chandra.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2023 09:20 PM
Hello @Kalyani35
Greetings!
Any feedback on my reply? were you able to do this?
Help others to find a correct solution by marking the appropriate response as correct answer and helpful!
Kind Regards,
Ravi Chandra.