List View Download button

Raghav Manchand
Tera Contributor

I want to create List view UI action where the user can download a specific Excel File.

I'm trying to create a function but it seems to be not working or giving any response when the button is clicked.

The same ui action if I've not checked on client and without a function is working but I have to select a record which I don't want.

1 ACCEPTED SOLUTION

@Raghav Manchand 

Then use below script in UI Action.

onClick = confirmDownload()

 

function confirmDownload() {
	
	var URL = '<Link_Of_Attachment>';
    var down = confirm('Do you want to download the file?');
    alert(down);
    if (down) {
		g_navigation.openPopup(URL);
    }
}

 

View solution in original post

7 REPLIES 7

Hi @Muhammad Khan 

Just to be clear. I'm trying to download an Attachment with the Attachment Link from this UI action

@Raghav Manchand 

Then use below script in UI Action.

onClick = confirmDownload()

 

function confirmDownload() {
	
	var URL = '<Link_Of_Attachment>';
    var down = confirm('Do you want to download the file?');
    alert(down);
    if (down) {
		g_navigation.openPopup(URL);
    }
}

 

Hi @Muhammad Khan Thanks a lot for helping me out