function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ron CarlsonRon Carlson 

Formula field hyperlink to open/view pdf ("Files") without manual download

In our org, attachments are emailed to records via an email service.  From the record we want to view the "Files" with one click.  I want to create a link in a formula field that will download Salesforce "Files" pdf documents into a viewer without requiring extra clicks to download and open the file.  The hyperlink works in Classic, but in Lightning it opens the detail page and you have to download the file to view it.  The hyperlink in classic uses a servlet file download to view the file.  Can something like this be done in Lightning?  Here is the formula used in Classic:
If( Document_Name_1__c <>'', HYPERLINK('/servlet/servlet.FileDownload?file='&DocumentID_1__c , Document_Name_1__c ),'')