When a change request is completed, send an email to the assigned to person on all related problems
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2023 08:59 PM
When a change request is completed, send an email to the assigned to person on all related problems and incidents informing of the closure.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2023 10:38 PM
Hi there,
Can you explain your question a bit more? It's just a one liner know. What are you expecting from community members here?
Maybe you can provide some info on what you already performed, what's not working, what your actual issue is, etcetera.
Kind regards,
Mark
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2023 10:47 PM - edited ‎01-06-2023 10:51 PM
Hi @Pratiksha Lang1,
You have to write After update business rule on Change request [change_request] table. Where condition is when Change request state is closed.
Add event in event registry and configured notification and will be triggered based on when event fired through BR.
Sample scripts - modify it accordingly.
Problem:
if (current.state.changesTo(3)) { // change request state value close (3)
notifyRelatedProbelmAssignee(current);
}
function notifyRelatedProbelmAssignee(chg_request) {
var probObj = new GlideRecord("probelm");
probObj.addQuery("rfc", chg_request.getUniqueValue());
probObj.query();
while (probObj.next()) {
if (probObj.active == true) {
gs.eventQueue("add.event.name.here", probObj, probObj.assigned_to.email.toString());
}
}
Incident:
if (current.state.changesTo(3)) { // change request state value close (3)
notifyRelatedIncidentsAssignee(current);
}
function notifyRelatedIncidentsAssignee(chg_request) {
var incObj = new GlideRecord("incident");
incObj.addQuery("rfc", chg_request.getUniqueValue());
incObj.query();
while (incObj.next()) {
if (incObj.active == true) {
gs.eventQueue("add.event.name.here", incObj, incObj.assigned_to.email.toString());
}
}
Thanks,
Sagar Pagar