incident resolve

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2024 05:24 AM - edited 04-03-2024 06:11 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2024 05:26 AM
@Community Alums Please post the snapshot of the business rule and script here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2024 05:35 AM
Hi @Community Alums ,
Here for ur requirement a BR will suffice. Try the below script n check if it works for u. BR should trigger when state changes to resolved.
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
var incidentGr = new GlideRecord('incident');
incidentGr.addQuery('problem_id', current.sys_id);
incidentGr.query();
while (incidentGr.next())
incidentGr.state = '6';
incidentGr.update();
}
})(current, previous);
Thanks,
Danish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2024 05:44 AM
Tried with this BR but it is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 09:11 AM
Hi @Community Alums ,
Possible to share screenshot?
Also can we try to put some logs at the beginning to check whether the BR is triggering or not.
Thanks,
Danish