How to display a message when an Incident is a Parent or Child?

Kevin Parker
Tera Expert

Howdo,

I have what I thought was a simple task and appears to have turned out to be anything but! I want to display a message at the top of an Incident record to warn people if it is a Child or a Parent (or possibly both!)

The child message is easy as I can use a business rule to check the Parent field. What I can't work out is how to display the message if the Incident has any Child Incidents linked to it. I am not that familiar with Javascript but have scoured the community for anything that would help without success. Does anyone have anything in place that I can borrow? Please feel free to tell me there is something OOTB that I have missed?

Thanks in advance.

Kevin

1 ACCEPTED SOLUTION

Mark Roethof
Tera Patron
Tera Patron

Hi there,

See the screenshots below! Tested this on my personal developer instance, works instantly.

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark

find_real_file.png

find_real_file.png

find_real_file.png

find_real_file.png

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

View solution in original post

5 REPLIES 5

Community Alums
Not applicable

Hi Kevin,

To find if an Incident has any child incidents, you search is really going to be for other Incidents that have the current incident listed as a parent. If you do not need to list the child incidents and just need to know if any exist, run a script that to get any incidents where the current incident is the parent_incident. Take a look at the Create a Business Rule to Check if User is the Caller on any Other Incidents section of my blog post on GlideRecord get(). The example there is similar to what you are looking to do, except it is finding other incidents with the same caller instead of incidents with a parent_incident that matches the current record. Here's the link: https://developer.servicenow.com/blog.do?p=/post/training-grget/

Also, you could add the child incidents as a related list so they are easy to see what the child incidents are.

Hope this helps.

Ben