Posted: 11 May 2017 14:28 EDT Last activity: 12 May 2017 11:29 EDT
Download ALL Attachments functionality
We have a requirement to download all attachments of a workobject with the one click of a button.
I have added a custom coding where , I'm browsing the pc_link_attachment table for the pxLinkedRefFrom value for the particular work objects and is calling the activity Work-.DisplayAttachFile on a loop of the above result count, and passing the value of pxLinkedRefFrom everytime.
In tracer I have observed although the DisplayAttachFile is getting called multiple times with correct parameter each time but on the user browser everytime the last attachment in the list is getting downloaded and NOT ALL.
Consider zipping up all the attachments into a single file and then triggering the download for that.
This post may help here: it shows you have to do the first bit (zip up all the attachments) - you would need to add to this solution to trigger the download (that should be the easier bit to achieve though probably).