Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Download file does not work



A link is configured in the application to download a file. Post upgrade to Pega 8.1, the download link does not work.

Error Messages

Not Applicable

Steps to Reproduce

  1. Configure a link on click of which the 'Refresh this Section' action is invoked.
  2. Invoke the out-of-the-box DownloadFileByName activity.
  3. Click the link. The file is not downloaded.

Root Cause

A software use or operation error.
This is an unsupported implementation of the activity to download the file.


Perform the following local-change: 
  1. Copy the below JavaScript in the UserWorkForm.

    function downloadFile(activityName, className, applicationName, fileName, fileType){
    var suURL = SafeURL_createFromURL(pega.u.d.url);
    suURL.put("pyActivity", activityName);
    suURL.put("pyClassName", className);
    suURL.put('Type', fileType);
    var formEle = document.createElement('form'); "download_file";
    formEle.method = "POST";
    formEle.action = suURL.toURL();
    formEle.targe t= "";

  2. Configure the RunScript on the Download link.
  3. Invoke this function.

Published December 2, 2021

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us