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
MikeD13MikeD13 

Open Document in Custom Link

Each of my accounts will have a PDF document associated with it. I would like to create a custom link on the account detail screen to point to this document. The title of the document will be unique based on the external ID I supply.

Unfortunately, it looks like the document link uses the ID instead of the title I assign:
https://na5.salesforce.com/servlet/servlet.FileDownload?file=01570000000dfqf

How can I create a link that will determine the correct ID and open the document?
Vijay RautVijay Raut

You can use the merge field in custom links to replace the Id at runtime.

Unfortunately, SFDC is not supporting documents fields as a merge fields.

MikeD13MikeD13
I'm not following you. I understand how to use merge fields and I know how to concatenate a string to build a URL. The problem is there is no merge field to retrieve a document ID. So, I'll ask the question a different way:

How can I retrieve a document ID by document title?