g_form.flash on a related list?

s_rgioc
Kilo Contributor

Hi,

I have client script that triggers on submit of a specific UI Action. It's working well but I would like to bring the User's attention to a related list in the form if a certain condition is met.

g_form.flash seems like a good way to do that BUT I don't know how to apply it to a related list.

Is it possible?

Thank you.

1 ACCEPTED SOLUTION

Ankush Agrawal
ServiceNow Employee
ServiceNow Employee

Hi Sergio



This is not possible with OOB g_form.flash. The function is designed to use the label which is not present in the related list. You have to create a new method for the same.


Below is a quick snippet to get the list of all the headers of the related lists. You can play around to get the exact focus.


document.getElementById('tabs2_list').getElementsByClassName("tabs2_tab")



Please let me know if you want further help.


View solution in original post

11 REPLIES 11

Kalaiarasan Pus
Giga Sage

Wouldn't a info Message or a alert be enough ?


Enough? Yes, but since the point is to warn the user the list must have at least one value, it would be nice to alert them to that same list, the same way you alert that a mandatory field is not filled in.


Hi Kalai,



Can we add a info message for a related list to let users know what to select from the slush bucket of related list. can you please let me know if we achieve this.



Thanks,


Niranjan.


Ankush Agrawal
ServiceNow Employee
ServiceNow Employee

Hi Sergio



This is not possible with OOB g_form.flash. The function is designed to use the label which is not present in the related list. You have to create a new method for the same.


Below is a quick snippet to get the list of all the headers of the related lists. You can play around to get the exact focus.


document.getElementById('tabs2_list').getElementsByClassName("tabs2_tab")



Please let me know if you want further help.


You had the most complete answer so marking as correct.


I don't want to mess around with DOM much, so I'll just leave a message, it might be useful if I do want it in the future though.


Thank you Ankush.