Question

3
Replies
906
Views
Vikram Reddy (Vikram22)
TechMahindra

TechMahindra
IN
Vikram22 Member since 2014 27 posts
TechMahindra
Posted: June 4, 2019
Last activity: June 20, 2019
Posted: 4 Jun 2019 20:42 EDT
Last activity: 20 Jun 2019 1:19 EDT
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 Experience
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.