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

Busy indicator does not go away after using MSOGenerateExcelFile

SA-40863

Summary



Busy indicator does not disappear after using MSOGenerateExcelFile.


Error Messages



Not Applicable


Steps to Reproduce



Configure a button to perform a section refresh and call MSOGenerateExcelFile activity.


Root Cause



This is an implementation issue. A file download must not be performed in a section refresh. In this case the AJAX success callback was not executed. Additionally, even without a hanging busy indicator, this design will result in the inability to click the button twice in one session. No request will be generated after the first click.

Resolution



Invoke the file download through a Java Script as described in the following steps.

1. Configure a wrapper activity (which is allowed to be run from a script) to call
MSOGenerateExcelFile.





2. Create the below custom download function in the UserWorkForm


function downloadFile(pyActivity, FSFileName, TemplateRFB, DownloadFile)
{
var sURL = SafeURL_createFromURL(pega.u.d.url);
sURL.put('pyActivity', pyActivity);
sURL.put('FSFileName', FSFileName);
sURL.put('TemplateRFB', TemplateRFB);
sURL.put('DownloadFile', DownloadFile);

var formEle = document.createElement('form');
formEle.id = "download_file";
formEle.method = "POST";
formEle.action = sURL.toURL();

if(pega.env.ua.webkit)
{
formEle.target = "";
}

document.body.appendChild(formEle);
formEle.submit();
document.body.removeChild(formEle);
}



3. Call this script instead of the refresh section or activity calls.

Published August 17, 2017 - Updated October 8, 2020

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