How to create a list banner button in a table to down load in pdf the list of records.

ArjunL
Tera Contributor

I have created a list banner button in the problem table to down load the list of related problem to incident,

 

the scripting part i dont know what to write.

.

This button is similar to export pdf in list view.

ArjunL_0-1716205434916.png

 

silmilar kind of button neeed in  problem banner. to down load the list of records.

 

ArjunL_1-1716206017779.png

 

 

21 REPLIES 21

@ArjunL 

try this

function downloadPdf(){

	var checked = g_list.getChecked(); // get's the sys_id of the checked records
	var arr = checked.split(',');
	for(var i in arr){
		var url = '/u_sample_table.do?PDF&sys_id=' + arr[i] + 'sysparm_view='; 
		window.open(url,'_blank');
	}
}

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

I have used the same script , but it is not working. after clicking the button nothing is happening(download popup is not opening)

image (5).pngimage (4).png

 

 

@Ankur Bawiskar , Could you please reply on it?

@Ankur Bawiskar , Could you please provide me the right code and look into it.

@ArjunL 

did you see alert came when button is clicked?

you need to select the records from list and then click the List Banner

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader