Question
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
CBA
AU
Last activity: 20 Apr 2020 5:59 EDT
Attachment to temp case
Hi,
I need to attach an attachment while the case is not persisted into db as it is a temporary work object. Is there any possibility to add multiple attachments when it is temporary work object. ?
***Edited by Moderator Marissa to update Platform Capability tags****
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
CBA
AU
1) Use OOTB section pzDragDocument to upload files in temporary work objects. This section will form a page list dragDropFileUpload in the current thread of class Embed-DragDropFile. This page list will have the information about the uploaded file like File Name, File stream, attachment type, etc.
2) Now create a custom page list property of Embed-DragDropFile class and have it under the work page. Copy the results from the step 1 list to our custom page list property for each upload.
3) Now when you persist the work object, loop through the page list property under pyWorkPage and invoke logic to attach those to the work object
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Pegasystems Inc.
FR
Hello,
Have you seen this discussion already: https://collaborate.pega.com/question/attaching-file-temporary-work-object
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
CBA
AU
Yes, I have seen that link already which is not helpful.
Thanks for the reply..!
Updated: 14 Jun 2021 7:38 EDT
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Pegasystems Inc.
IN
Please find the below article which might be helpful.
https://collaborate.pega.com/idea/attachments-temporary-case
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
CBA
AU
I have seen that link already which is not helpful so dropped query on PDN
Thanks for the reply..!
Updated: 14 Jun 2021 7:38 EDT
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Pegasystems Inc.
IN
You can use Attach Content control to upload files to the case and it will be stored on the pyAttachmentPage page and after persisting the case you can call OOTB activity "pyAttachmentPage" by passing .pzInsKey for WorkInsKeyt and pyAttachmentPage.pzInsKey for AttachInsKey as parameters to attach it to 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 Inc.
IN
Hi Sam,
I could see the Enhancement request(FDBK-60599) is being raised for future implementation of this feature.
https://collaborate.pega.com/idea/attachments-temporary-case
Thanks
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
CBA
AU
Thanks for the reply
Accepted Solution
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
CBA
AU
1) Use OOTB section pzDragDocument to upload files in temporary work objects. This section will form a page list dragDropFileUpload in the current thread of class Embed-DragDropFile. This page list will have the information about the uploaded file like File Name, File stream, attachment type, etc.
2) Now create a custom page list property of Embed-DragDropFile class and have it under the work page. Copy the results from the step 1 list to our custom page list property for each upload.
3) Now when you persist the work object, loop through the page list property under pyWorkPage and invoke logic to attach those to the work object