Open attachments in a new browser window

Hi,

If you click an attachment in Sugar (6.x), for example in the Notes section, then the file will be downloaded.

We have a lot of attached PDF's in our CRM. Is it possible to open/view the PDF (in a new browser window) instead of having to download the file each time?

That would save us a lot of time.

  • I already implemented it by changing download.php which is not upgrade safe.


    Can it also be done in an upgrade safe way?

  • Hello Luolun,

         One thing you can do and that is create new button in notes module e.g. 'View pdf' and on clicking of that button you can call your custom file where you have custom code to show that pdf in new tab/window of a browser. In this way you can achieve it and it is also upgrade safe. Let me know if you have any query.

  • Hi Sohan,

    I got it to work now in an upgrade safe way. Thanks a lot!

  • HI

    Thank you for this suggestion

    Question on this

    Most of our users are access a Document file via the Opportunity > Documents subpanel

    Is it possible to add a custom button to a subpanel?

  • which version do you use? The above post is 7 years old and related to the old version 6.
    In version 7++ the handling is completely different.

  • Thank you :) we are using Sugar 9, however, soon to upgrade to Sugar12.

    Your comment made me dig a little more into our browser settings side of things and think I have cracked it Slight smile

    Opportunities > Documents subpanel - users click on "file"

    For Edge user needs to change the download setting by right-clicking on the download and selecting Always Open with system viewer

    This now auto opens PDF in a new tab Slight smile

    Thanks

  • Hello Harald,

    We are currently using on-prem Sugar Sell 12 (hoping to move to 13 soon). Being able to open attachments without having to download is something we've had on our wish list for a long time.

    What is the handling for the versions newer than the original post?

  •  

    Could you please share the code or snippet so that i will try the same in my instance, i have the same requirement, instead of downloading the file, client want to preview it first.