send notification to users in related list

IceIronDragon
Tera Guru

Hello All,

 

We have a requirement where in notifications should go to all the affected users in the related list not just one in the Affected user field on the form.Whats happening right now is the notification is only being sent to the person in affected user field, not for multiple users in the related list

 

IceIronDragon_0-1669132917546.png

 

IceIronDragon_1-1669132955271.png

 

 

1 ACCEPTED SOLUTION

use below script in mail script. Glide Proper table which is present on related list and field names.

 var gr = new GlideRecord("Related list table Name");
    gr.addQuery("task", current.sys_id);
    gr.query();
    while (gr.next()) {
        email.addAddress("cc", gr.user.email, gr.name);
    }

Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

View solution in original post

11 REPLIES 11

ChrisBurks
Giga Sage

I don't have anything to add here especially since @Gunjan Kiratkar has provided a solution.

I just wanted to comment on @IceIronDragon cool username and avatar.

Nice solution @Gunjan Kiratkar 

Thank you, Chris.  I use this moniker wherever I can. 🙂