Display Attached Files in Activity View
we have been customized the Activity Form in SCSM to show the relates Items including the Attached Files.
Now i want to see the attached Files in Cireson Portal at the Activity
Any ideas?
Best Answer
-
Martin_Blomgren Customer Ninja IT Monkey ✭✭✭✭Wrapped something up quickly as a proof of concept so there is definitely room for improvements but here you go
custom_AddMAFileAttachments.js7
Answers
https://www.scutils.com/blog/scutils-blog/system-center-2012-service-manager/related-items-for-manual-activities
https://community.cireson.com/discussion/169/add-support-group-field-to-portal-ma-activity-form
To actually fetch your MAs with the FileAttachments you need you use Cireson API with the TypeProjection included in the solution you referred to and then you can display the attachments by appending html with jQuery.
When appending those attachments you need to create an eventhandler so you can fetch the actual filestream with Cireson API which is returned as a Base64 string. All that is left to do is to convert the Base64 string to a binary blob and download it for the user.
custom_AddMAFileAttachments.js
works like a charm now, have made a simple edit on GitHub, the MA66 was hardcoded at line 88
regards Michael Seidl
what i see, that there is a endles loop, if there is a PA in the WorkItem, do you have an idea?