To Preview the Attachment attached in incident Form

GirirajThanvi
Tera Contributor

I have been given a task that when an attachment is attached to any incident on clicking the attachment name it should be previewed  not download we have to solve this using iframe ,i have attached the image below the attachment name is encircled by red circle marker kindly help me to code and develop it.

4 REPLIES 4

Mark Manders
Mega Patron

Install the document viewer plugin. That should take care of most attachments.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

GirirajThanvi
Tera Contributor

I didn't find this solution helpful,neither is it as per my constraints,kindly help me.

Explain the requirement? You are there to provide the best solution for a problem your client is having. Why does it need to be previewed instead of downloaded? And why doesn't the OOB solution of the document viewer plugin solve this? "We have to solve this using iframe" needs to be explained. Why does it have to be an iframe solution?


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Ankur Bawiskar
Tera Patron
Tera Patron

@GirirajThanvi 

I agree with @Mark Manders here, why to use iframe or any external library and not use OOTB capability.

You can use "Document viewer" feature and this will allow your users to view the attachments.

Remember not all file types are supported there

check this doc link on the same

Enable Document Viewer 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader