I am managing my document in SF content library.
I want to include a link to some documents in a VF page BUT I don't want the link to open the document preview on the Content tab.
I would like the document to be downloaded when the link is clicked.
This will only be available from within the organization (not a public VF page).
Is there any way to achieve this?
Best Answer
You can directly download using the ContentVersion Id:
The ContentVersion is related to the ContentDocument via a dedicated ContentDocumentId. Get the ID of the one where
IsLatest
is true.