Question
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
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!
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689968000/54c68a50-22c7-47d5-98f2-63df69104811.jpg?itok=I5MMyPJN)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689968000/54c68a50-22c7-47d5-98f2-63df69104811.jpg?itok=I5MMyPJN)
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
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
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
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
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
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689968000/54c68a50-22c7-47d5-98f2-63df69104811.jpg?itok=I5MMyPJN)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689968000/54c68a50-22c7-47d5-98f2-63df69104811.jpg?itok=I5MMyPJN)
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
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
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
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689954000/f7151e69-7bd9-4702-be03-ebb6f0beb05f.jpg?itok=GWX3Wdig)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689954000/f7151e69-7bd9-4702-be03-ebb6f0beb05f.jpg?itok=GWX3Wdig)
Adaps
IN
Please find below link might help you
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
CollabPartnerz
IN
can you try using Call view ?
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689953000/cd03b168-60d6-4fef-a2c4-e70c1967e742.jpg?itok=XeOAO6Nl)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689953000/cd03b168-60d6-4fef-a2c4-e70c1967e742.jpg?itok=XeOAO6Nl)
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.
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Bits In Glass
GB
Hi
Please refer the link
https://collaborate.pega.com/question/showing-parent-case-attachments-covered-cases