How to Move the problem state from 'Fix in Progress' to Resolved based on condition?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2022 03:26 AM
Hi ,
I have a requirement
when Problem Record moves from state "Fix in progress" to "Resolved" it needs to check the condition ie..,When the Problem task is Open then the Problem record will not move from "fix in progress" to "Resolved" and display error message .If problem Task is closed then the problem record will moves to Resolved state.
Thanks in advance
- Labels:
-
Problem Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2022 03:45 AM
Hi you can have a before update Business rule on Problem Table
Condition: when state changesto resolved
Script:
var pTask= new GlideRecord("problem_task");
pTask.addQuery("problem",current.getValue("sys_id"));
pTask.addQuery('state','NOT IN','2'); // Problem Task state not in closed
pTask.query();
while(pTask.hasNext()){
gs.addErrorMessage("If problem Task is closed then the problem record will moves to Resolved state "+current.number);
current.setAbortAction(true);
}
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2022 05:14 AM