Question


Pegasystems Limited
US
Last activity: 18 Sep 2019 15:30 EDT
Download Attachments by clicking on Link Control
Hello
I have a list (table) of open cases in which there is an attached file. I need to display a link to download the internal case file to the table of open cases.
1 How are files downloaded?
2 How to do this by clicking on Link Control?
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!


Coforge DPA
GB
Hello
Have a look at the implementation done in below link:
https://collaborate.pega.com/question/download-document-click-link
Hope it helps
Regards
Bhavya


Pegasystems Limited
US
thanks for your reply
According to the link offered by you, if I understood correctly, they act inside the case, but I need to make a link to download outside the case


Pegasystems Limited
US
If I try using pega.ui.HarnessActions.doAttachmentSingleClick, I don’t know what parameters to pass, because I do not have all the data about the attached file outside the case, from where I need to download it


Coforge DPA
GB
Hi
By "outside the case" you mean , that you are hitting some other database to retrieve the document ? Or is it something else?
Regards
Bhavya


Pegasystems Limited
US
Hello
I mean that in case “B” I have attached file and I try to open it from case “A” (parent case) by clicking on Link.
"A" - parent case
"B" - child case


CollabPartnerz
IN
Please find below link might help you


CollabPartnerz
IN
can you try using Call view ?


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
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.


LTI Mindtree
IN
Hi
Please refer the link
https://collaborate.pega.com/question/showing-parent-case-attachments-covered-cases