Bulk Delete Task Dependencies

KarrieDash
Tera Expert

Is there a way to delete multiple task dependencies from multiple rows in one action?

KarrieDash_0-1742845683931.png

 

1 ACCEPTED SOLUTION

Shivalika
Mega Sage

Hello @KarrieDash 

 

Yes, you can run a background script - 

 

var gr = new GlideRecord('pm_task_dependency'); // Table for task dependencies

gr.addQuery('task', 'IN', 'TASK_SYS_ID_1,TASK_SYS_ID_2'); // Replace with actual task sys_ids

gr.query();

 

while (gr.next()) {

    gr.deleteRecord();

}

 

gs.print('Deleted multiple task dependencies successfully.');

 

Modify: Replace TASK_SYS_ID_1, TASK_SYS_ID_2 with actual task sys_ids

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket. 

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY

 

View solution in original post

1 REPLY 1

Shivalika
Mega Sage

Hello @KarrieDash 

 

Yes, you can run a background script - 

 

var gr = new GlideRecord('pm_task_dependency'); // Table for task dependencies

gr.addQuery('task', 'IN', 'TASK_SYS_ID_1,TASK_SYS_ID_2'); // Replace with actual task sys_ids

gr.query();

 

while (gr.next()) {

    gr.deleteRecord();

}

 

gs.print('Deleted multiple task dependencies successfully.');

 

Modify: Replace TASK_SYS_ID_1, TASK_SYS_ID_2 with actual task sys_ids

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket. 

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY