Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Task 1 will close once all 5 Task will close only

Not applicable

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