Scroll down to related list (UI Action)

Simon Ciglia
Giga Guru

Hi folks

I want to have a Button (UI Action) which scrolls down to the related list.
This isn't working....any ideas :-D?

find_real_file.png

This button "Scroll down" should scroll down to the related lists

find_real_file.png

To this related list "Taskana Incident Tasks"find_real_file.png

1 ACCEPTED SOLUTION

mak1A4
Tera Guru

It is possible but only under certain circumstances and without the use (and support) of ServiceNow APIs. First the UI-Action has to be in [global] scope and second you have to uncheck the [isolate_script] flag. Then you can use the following function for the onClick event:

function scrollToEventReg() {
	var scrollTo = $j('.section_header_content_no_scroll').height();
	window.$j('.section_header_content_no_scroll').animate({ scrollTop: scrollTo }, 200);
}

 

View solution in original post

10 REPLIES 10

mak1A4
Tera Guru

It is possible but only under certain circumstances and without the use (and support) of ServiceNow APIs. First the UI-Action has to be in [global] scope and second you have to uncheck the [isolate_script] flag. Then you can use the following function for the onClick event:

function scrollToEventReg() {
	var scrollTo = $j('.section_header_content_no_scroll').height();
	window.$j('.section_header_content_no_scroll').animate({ scrollTop: scrollTo }, 200);
}