Support Article
Link option does not work for downloading process
SA-10869
Summary
User is downloading a file from server path using download button, but as per the user's requirement the requirement is to replace button with pxlink. But using pxlink, user is unable to download a file from server path.
Error Messages
Not Applicable. Not able to download from the server.
Steps to Reproduce
Not Applicable.
Root Cause
User has upgraded from PRPC 6.3 SP1 where the onclick of the button, it is downloading a file from the server path.
Now according to his client requirements user requires to change it to the link which is not working as expected.
Resolution
Following is the local-change where on click of the link, the following code is executed.
<script>
function openLink(event){
var grid = Grids.getActiveGrid(event);
var index = grid.getActiveRowIndex();
customActivityInPopup(pxReqURI+'?pyActivity=DownloadImageFile&pzPrimaryPageName=pyWorkPage..Attachments('+index+')','30','30',event);
}
<a href="https://community.pega.com/" onclick="openLink">Open Url In Window </a>
</script>
Published June 30, 2015 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.