- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 07:37 PM - edited 04-27-2023 07:08 PM
Is there a way to update the work notes for the related issue record when the change management is closed?
Best regards, and thank you in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 10:23 PM
yes it's possible.
you can use after update BR on Change Request Table
Condition: State Changes to Closed
Script:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var gr = new GlideRecord("problem");
gr.addQuery("rfc", current.getUniqueValue());
gr.query();
while (gr.next()) {
gr.work_notes = 'The associated change request ' + current.number + ' is closed';
gr.update();
}
})(current, previous);
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
04-24-2023 08:47 PM
@honamiUeo You will have to create a onBefore update business rule on the change management record, set the filter to state changes to closed. Make a glide record query to issue record where parent is current change management record and update the worknotes of issue record.
I recommend to share the snapshot of related issue record and change management record so that I can share the exact script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 10:16 PM
Thanks for the reply.
I have added a caption image.
Do you understand my intention?
Thank you in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 08:50 PM
what script did you start with and where are you stuck?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 10:18 PM
Thanks for the reply.
I have added the image and hope you can check it out.
Thank you in advance.