Question
Accenture
IN
Last activity: 29 Mar 2019 3:51 EDT
Download a document on click of a link
Hi All,
Requirement is to download a document on click of a link from a section. Please let me what should be the process to do so. And where should I store the file that needs to be downloaded.
Thanks in advance.
Sarita
-
Likes (2)
Subham Singh Gerrit Smink -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Standard Chartered
IN
Hello,
"pega.ui.HarnessActions.doAttachmentSingleClick" use this script and pass the linkkey.
TATA Consultancy Services
IN
Use attachment Section to attach a file or U can use "Attach content" Control to attach a file.
Use the pyAttachments pagelist property to display the attachment in the UI. Its holds the all attachment attached in current the case.
Use GetAttachmentReference activity to download the attachment from UI to desktop.
Accepted Solution
Standard Chartered
IN
Hello,
"pega.ui.HarnessActions.doAttachmentSingleClick" use this script and pass the linkkey.
-
Ram Reddy Yeredla Sruthy k s Vachan Chauhan
Areteans
AU
Hello,
Thank you for the help. It worked.
Regards,
Siddharth Aggarwal
-
Balakrishna Nallamalla
Pegasystems Limited
US
What is LinkKey? I have not found this property anywhere. What do you use in this property?
-
Rahul Choudhary
LTI
IN
Hi,
Refer this OOTB control pyAttachmentFeedDescription for more info.
Here Linkey is the pzInskey of the Link-Attachment class and it will present in this page pyWorkPage.pyAttachments().
-
Vachan Chauhan
Standard Chartered
IN
On link call one activity, Create a page called AttachPage and set following properties
>pxAttachName (file name with extension)
>pyAttachStream(binary file)
Add one more step and use JAVA method , put below code
On link call one activity, Create a page called AttachPage and set following properties
>pxAttachName (file name with extension)
>pyAttachStream(binary file)
Add one more step and use JAVA method , put below code
try{
ClipboardPage AttachPage=tools.getStepPage();
String sFileName = AttachPage.getString("pxAttachName");
String sMsg = tools.sendFile(AttachPage,"pyAttachStream",true,null,sFileName,false,null,true);
if(!sMsg.equals(""))
{
pega.terminateActivity();
}
}
catch(Exception e){
oLog.error("Download attachment error: "+e);
}
Note: For some file extension such as txt or xml etc, highlighted underlined boolean value set to false for SendFile public API.