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
Giga 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();
}

 

********************************************************************************************************
Please appreciate the efforts of community contributors by marking the appropriate response as the correct answer and helpful. This may help other community users to follow the correct solution in the future.

********************************************************************************************************
Cheers,
Prashant Kumar
ServiceNow Technical Architect


Community Profile LinkedIn YouTube Medium TopMate
********************************************************************************************************

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

my balance assignments. So I decided to try https://ukwritings.com/write-my-essay and it was a great experience. ukwritings provides essay writing, proofreading, and editing services tailored to students. They prioritize original content, timely delivery, and confidentiality, offering various academic levels and deadlines. I will use this website service for all my upcoming assignments.

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.