- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2024 04:46 AM
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2024 07:39 AM
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.
:{)
Helpful and Correct tags are appreciated and help others to find information faster
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2024 07:34 AM
You can do that, but why you can have as parent the same incident? This is very wrong to me...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2024 07:39 AM
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.
:{)
Helpful and Correct tags are appreciated and help others to find information faster