Join us Dec. 16 for The Community Hour, our first global virtual User Group event!

Change Request

indrajeetma
Tera Guru

When a "Change Request" is in the "Review" state and is marked as "Rejected," automatically sets the state of all related tasks to "Canceled."

7 REPLIES 7

PrashantLearnIT
Tera Sage

HI @indrajeetma 

 

Create a Business Rule to run After the Update

with the condition current.state == 'Rejected' && previous.state == 'Review';

 

with script as 

var tasks = new GlideRecord('task');
tasks.addQuery('change_request', current.sys_id);
tasks.query();

while (tasks.next()) {
tasks.state = 'Canceled';
tasks.update();
}

 

Is there any state has value rejected?

To automate this process, create a workflow rule that triggers when a "Change Request" in the "Review" state is marked "Rejected," updating the status of all related tasks to "Canceled" automatically. This approach streamlines task management by eliminating the need for manual updates, ensuring that no tasks remain active for rejected requests! I was struggling with all

Bert_c1
Kilo Patron

@indrajeetma 

You make a correct statement. There is an OOB BR for that named "Cancel change_tasks" defined on the change_request table.