Question

3
Replies
815
Views
Vikram22 Member since 2014 20 posts
TechMahindra
Posted: 1 year ago
Last activity: 1 year 4 months ago
Closed

on click using run script to download excel file showing activity status screen

Issue1:We are using below script on click button able to download the excel file ,As per requirement if there are no results i need to set message on UI (If pxResultsCount>0 is false then Page-Set-Message) with message its showing Activity Status screen on UI.

In Tracer :

After Page-Set-Message step Activity ends and built in ActivityStatusNoContentHandler Pega UI Engine 07-10-33 Activity Begins.

function downloadFile(activityName, className)

{
var suURL = SafeURL_createFromURL(pega.u.d.url);
suURL.put("pyActivity", activityName);
suURL.put("pyClassName", className);

var formEle = document.createElement('form');
formEle.id = "download_file";
formEle.method = "POST";
formEle.action = suURL.toURL();
document.body.appendChild(formEle);
formEle.submit();
document.body.removeChild(formEle);
}

Tired below solution it did not work

in script form element target must be null like --

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

Issue 2: on Click on button refresh this section calling activity .(If pxResultsCount>0 is false then Page-Set-Message) working as expected.

If Results Count > 0 is true calling OOTB MSOGenerateExcelFile excel file is not downloading.(In tracer i can see Activity is getting called).

Thank you in advance for your help.

Data Integration Java and Activities User Interface
Moderation Team has archived post
Share this page LinkedIn