Task 1 will close once all 5 Task will close only
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2024 08:51 AM - edited 10-29-2024 07:03 PM
Hi Team,
we have work order (Parent) and 5 work order task's (child)
My Requirement is Task 1 will open state untill all 4 task will close, if all 4 tasks close means then he can close the task 1.
i tried this code it's checking every task,
var order=new GlideRecord('wm_task');
order.addQuery('parent',current.parent);
order.orderBy('sys_created_on');
order.query();
while(order.next())
{
var task=new GlideRecord('wm_task');
task.addQuery('sys_id',order.sys_id);
task.query();
if(task.next())
{
if(task.state=='3'){
gs.addErrorMessage('Please proceed with another task');
current.setAbortAction(true);
}
}
}
i need when user close task 1 at the time only i will restrict, for task 2 , task 3, task 4, task5 he can proceed to close
How can we achive this.
Regards,
Rajesh Gillerla.
0 REPLIES 0