When any Problem Ticket closed then related incidents should automatically close

Harshad1
Kilo Contributor

When problem ticket closed then related incidents tickets should close automatically

Is there Out Of The Box way to achieve this?

1 ACCEPTED SOLUTION

Prasad Dhumal
Mega Sage
Mega Sage

Hello Author,

Please follow this link

when problem ticket closed then related incidents close automatically - Developer Community - Questi...

Please mark Correct✅/helpful if applicable, thanks!!

Prasad

 

View solution in original post

9 REPLIES 9

Deepshikha 3010
Mega Guru

Hi Harshad Pasalkar,

I have tried with senario in my pdi you can use After Update Business Rule

// Add your code here
var vew = new GlideRecord('incident');
vew.addActiveQuery(); //Cross check only active incidents
vew.addQuery('problem_id', current.sys_id);
vew.query();

while(vew.next()){
vew.state = '7';
vew.close_code = 'Solved (Work Around)';
vew.close_notes = 'The incident is Closed/Resolved';
vew.update();
}

I also attached my docs of this pdi. Please refer this

If this solution works for you, please mark it as helpful.

Regards,

Deepshikha Pandey

 

Ankur Bawiskar
Tera Patron
Tera Patron

@Harshad Pasalkar 

Why not use Flow Designer with no Scripting

Example below:

Note: Remember to Save and Activate the Flow before you test

find_real_file.png

find_real_file.png

find_real_file.png

find_real_file.png

Final Flow Steps

find_real_file.png

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Harshad Pasalkar 

Hope you are doing good.

Did my reply answer your question?

If so, please mark appropriate response as correct & helpful so that the question will appear as resolved for others who may have a similar question in the future.

Thanks!
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Harshad Pasalkar 

Why not use OOB Business rule mentioned by @John Zhang ?

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

John Zhang1
Kilo Patron
Kilo Patron

There is OOB BR that can be used. You don't need to create and just activate this BR.

find_real_file.png