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
Rolando EstevesRolando Esteves 

Displaying link in VF that pops up a static resource file in order to download it.

Hi All!

 

How do I present a link in my visualforce page that when the users click it it pops out a static resource I uploaded into my org. The file is a .csv file.

 

Thanks in advance.

 

REG

Best Answer chosen by Admin (Salesforce Developers) 
Rolando EstevesRolando Esteves

Hey guys I got it thanks for the asnwer.

 

Heres my code:

 

<apex:outputLink value="{!$Resource.StaticResourceName}">Opportunity Products</apex:outputLink>

 

All Answers

sai.sfsai.sf

<apex:page showHeader="true" tabstyle="Case">

  <apex:outputLink value="https://cs3.salesforce.com/resource/1332777472000/Static_resource_name" target="_blank">Static resource</apex:outputLink>
</apex:page>

 

 

https://cs3.salesforce.com/resource/1332777472000/Static_resource_name ........... this is the link to file.

Rolando EstevesRolando Esteves

Hey guys I got it thanks for the asnwer.

 

Heres my code:

 

<apex:outputLink value="{!$Resource.StaticResourceName}">Opportunity Products</apex:outputLink>

 

This was selected as the best answer