Adding Assignment group in CC of a notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 08:48 AM
Hello All,
Can someone help me how to add an assignment group(of that change request) in cc when an email is triggering to change request approvers?
Example- Change request is assigned to 'example_group'. We need to add example_group in cc when email is triggering to change request approvers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 08:56 AM
Hi @Aasrita ,
You can do this using email script. For eg You have your notification created on change request table. In your email body call a mail script like this ${mail_script:script_name} // provide your email script name here
Create a email script which u going to call above. In that u can write
var gr = new GlideRecord("sys_user_grmember");
gr.addQuery("group", current.assignment_group); // give here the group name
gr.addEncodedQuery("user.emailISNOTEMPTY");
gr.query();
while(gr.next()) {
email.addAddress("cc", gr.user.email, gr.user.getDisplayValue());
}
Thanks,
Danish