To upload attachment, we need the instance key of the work object. But, In case of Temporary Work object – there is no instance created until it’s persisted.
The Pega OOTB attachments rules, requires an instance key to open the work object and save the attachments.
Is there any way, we can upload attachments successfully in temporary work object or is there some other solution.
you can use pxFileUpload control. When using this control you need to create one section that has a control that executes ‘PopupFileBrowser(ev)’ function and an activity like @baseclass.pzUploadFile. The files selected this way are uploaded to the file system but not yet saved in the database. pzUploadFile activity keeps uploaded file information in Primary.pyUploadedFile clipboard page of class Data-WorkAttach-File. When you create an actual case, you can use this pyUploadedFile page and attach a file to the case using one of the OOTB attachment activities which should be as simple as →