Change rejected at Authorize state incident work notes must get updated
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2023 06:30 PM
I want the change request to move to scheduled after being authorized. -If rejected at the authorize state then the feature is closed and updates the work notes of the parent incident.
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2023 07:48 PM - edited ‎12-06-2023 07:50 PM
Hi @Sakshi Lambat you can use the below script in workflow or Business rule with condition approval rejected
script:
var grinc = new GlideRecord("incident");
grinc.addActiveQuery();
grinc.addQuery("rfc", current.sys_id); // gets current change request sysID and must match changerequest(rfc) field on Incident table
grinc.addNotNullQuery("rfc");
grinc.query();
while(grinc.next()){
grinc.work_notes = current.work_notes.getJournalEntry(1); // copy latest worknotes to incident
grinc.update();
}
Regards
Harish
Harish