When change request closed then related problem ticket should close automatically.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2024 09:17 AM
I used below script but it is throwing errors. could you please make it correct.
// Business Rule: Close associated problem when change request is closed
// Table: Change Request [change_request]
// Condition : State changes to Closed
// When: After update
var problemGR = new GlideRecord('problem');
if (problemGR.get(current.sys_id)) {
problem.state = 3; // Set problem state to "Closed"
problem.update();
}
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2024 07:28 AM
Hello,
Inside if condition you have used "problem" variable instead of "problemGR". Please replace it and try.
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!