incident management

HarithaP
Tera Contributor

When user opens the existing incident and there is the parent incident of the same incident then there should be a message at the top.“this incident is child incident” and when user click on parent incident number, it should open the same incident in new tab.

1 ACCEPTED SOLUTION

johnfeist
Mega Sage
Mega Sage

Hi HarithaP,

 

As far as the message goes, you have two choices both involve a client script.  To put the message at the top your script would look something like this:

if (g_form.getValue("parent") != "") {
    g_form.addInforMessage("THis incident is a child to " + g_form.getDisplayBOx("parent).value);
}

You can also take advantage of the filed message to show your message immediately related to one of the fields on your form (e.g. number).  To do that:

var theParent = g_form.getDisplayBOx("parent").value;
if (tehParent != "") {
   var theMessage = "this is a child incident to " + theParent
   g_form.showFieldMsg(number, theMessage,  "warning");
)

Here's the link to the documentation for showFieldMsg.

 

As far as having the parent open in a separate tab, I don't know that you can do much for that with OOTB functionality since that behavior is pretty well set.  What you might try is protecting the parent and creating a UI Action (Go to parent).  In there, you will have better control over opening the parent in a new tab.

 

 

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster

View solution in original post

2 REPLIES 2

Community Alums
Not applicable

You can do that, but why you can have as parent the same incident? This is very wrong to me...

johnfeist
Mega Sage
Mega Sage

Hi HarithaP,

 

As far as the message goes, you have two choices both involve a client script.  To put the message at the top your script would look something like this:

if (g_form.getValue("parent") != "") {
    g_form.addInforMessage("THis incident is a child to " + g_form.getDisplayBOx("parent).value);
}

You can also take advantage of the filed message to show your message immediately related to one of the fields on your form (e.g. number).  To do that:

var theParent = g_form.getDisplayBOx("parent").value;
if (tehParent != "") {
   var theMessage = "this is a child incident to " + theParent
   g_form.showFieldMsg(number, theMessage,  "warning");
)

Here's the link to the documentation for showFieldMsg.

 

As far as having the parent open in a separate tab, I don't know that you can do much for that with OOTB functionality since that behavior is pretty well set.  What you might try is protecting the parent and creating a UI Action (Go to parent).  In there, you will have better control over opening the parent in a new tab.

 

 

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster