Change Request Notification Configuration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2025 07:36 AM
Hi Team,
I have a requirement like below,
Table: Change Request
when to send > The 'Reset' UI action button is used
Note: The 'Reset' UI action button is a custom one, on the change form, when we click on this button, if the change state is in Review or in scheduled state, it will be reset to as new state.
Who will Receive > Members of Group Approval Groups on the Change, where the Group Approval is in the Approve State.
How to achieve who will Receive requirement.
Regards,
Abhilasha G T
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2025 07:39 AM
so what did you configure and where are you stuck?
If stuck what debugging did you perform?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2025 08:30 AM
Hi Ankur,
Need a suggestion how to implement, am not able to do that.
Regards,
Abhilasha G T
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2025 09:03 AM
you want state to be updated and also email to be sent?
You can have event, notification on change_request table
you can use gs.eventQueue() to trigger the email
In Notification, use "Event parm1 contains Recipient" = True
UI Action Condition:
current.state.toString() == '2' || current.state.toString() == '0'
Script:
// 1. Find all group approvals for this change in the "approved" state
var approvedGroups = [];
var gaGR = new GlideRecord('sysapproval_group');
gaGR.addQuery('parent', current.sys_id); // Link to this Change Request
gaGR.addQuery('approval', 'approved'); // Use the correct value for "Approve" in your instance
gaGR.query();
while (gaGR.next()) {
approvedGroups.push(gaGR.assignment_group.toString());
}
// 2. For each group, find all active members
var recipients = [];
if (approvedGroups.length > 0) {
var gmGR = new GlideRecord('sys_user_grmember');
gmGR.addQuery('group', 'IN', approvedGroups.join(','));
gmGR.query();
while (gmGR.next()) {
var user = gmGR.user.getRefRecord();
if (user.active) {
recipients.push(user.sys_id.toString());
}
}
}
// Now 'recipients' contains the sys_ids of all users to notify
// You can use this array to send notifications, emails, etc.
gs.eventQueue('eventName', current, recipients.toString());
current.state = '-5';
current.update();
I hope you know how to configure event, notification etc.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2025 05:21 AM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader