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

oharel
Kilo Sage

Hi Sergio,



I like your idea, but my guess is that if it is possible, you'd have to use some DOM manipulation on the g_list, which might misbehave on browser updates.


Why not add an alert instead, or an infoMessage?



Harel


s_rgioc
Kilo Contributor

Yeah, I'll just use a message, thank you harel, since I don't want to risk breaking anything in the future, thank you!