Static resources allow you to upload content that you can reference in a Visualforce page, including archives (such as .zip and .jar files), images, stylesheets, JavaScript, and other files.

learn more… | top users | synonyms

2
votes
2answers
50 views

Invoking Javascript on VF Page from Static Resource

we have a Javascript sheet saved as a static resource and one of our developers is attempting to invoke a function from it in our visualforce page. In our visualforce page, we are using: ...
1
vote
1answer
34 views

Reference Static Resources or Documents with direct link and no login to system

Is there a way to access static resources or documents without being logged into the system. So if the file in not marked as "Internal Use Only", can I provide a direct link to it for others to access ...
0
votes
1answer
46 views

static resource cache old image

I have css file in static resources which refer to Images folder(.zip) to apply images to css classes. The gotcha is when i replace some images from images folder, on page it still showing older ...
1
vote
2answers
49 views

Refering Static zipped Resource in a Visualforce

I'm trying to reference a zipped icon in a VF like this: <img src="{!URLFOR($Resource.icons,'clock.png')}" class="orgIcon" /> Where icons is the name that I give the static resource. I've ...
1
vote
1answer
48 views

Inserting Test.loadData in into Salesforce DB for tests

I am able to load the static resource but I am unable to insert the loaded accounts into salesforce. I want to do this to be able to test various methods that depend on first selecting a particular ...
0
votes
1answer
54 views

How to Use an XML Static Resource to Program Unit Tests?

I've created a static resource XML file and uploaded it to my test org. My code coverage is around 41% and needs improvement due to there being numerous nodes in the XML file that need to be loaded ...
1
vote
2answers
55 views

Unit Testing Involved Multiple Objects

I used a static resource to perform a unit test on the loading of a sample contact. Previously, code coverage was at 0% and improved to 1% after running the test. My code is as follows: public ...
8
votes
1answer
78 views

PDF using Static Resource generated from REST doesn't display My Image

I have different ways in my organization to generate my invoice pdf and attach it to my records. My PDF includes a logo stored in a public StaticResource. It works perfectly everywhere except when I ...
6
votes
2answers
96 views

Javascript Button Issue

Full .js button code: {!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")} {!REQUIRESCRIPT('/resource/' & LEFT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(TEXT(NOW()),':',''),'-',''),' ',''),10) & ...
4
votes
1answer
98 views

How to reference static resources from a Community HTML header in a cache-compatible way?

Communities allow you to specify an HTML document as a header. However, it's just static HTML – no VisualForce. Therefore, you can't use URLFOR() to generate cache busting URLs to static resources, ...
2
votes
1answer
97 views

Accessing Local Static Resources from a Managed Package

I keep seeing conflicting information about whether this is possible, so hoping the supreme court of StackEx can definitively rule! I have a managed package that queries a field on the campaign ...
1
vote
1answer
60 views

Upload zip file in static resources

I am making one project in which I send a file on Heroku via HttpRequest (including file in attachment) and I got response zip file now I want to store this zip file in static resources. So how we ...
2
votes
1answer
114 views

Update StaticResource via APEX ToolingAPI

I'm trying to update StaticResources from APEX. Currently I'm using async methods of apex-mdapi and it works good. On the other side I'm using apex-toolingapi to update ApexClasses which works even ...
1
vote
3answers
188 views

Read text file as a static resource and display in a VF page?

I need to place my text file as a static resource in salesforce org. Then I need to read that text file and display the contents in a VF page. In this way whenever we want to update the text contents ...
3
votes
1answer
73 views

“No such column 'CacheControl' on entity 'StaticResource'” error

My problem is that the installation of a managed package I have created fails in one org reporting error codes such as "2143637119-8106 (1481522811)". On repeating the install, the last number stays ...
7
votes
2answers
373 views

When to use Static Resource vs Documents

I want to use a check mark image in the formula field. I got confused about where to store the image: in static resources or in documents. Please explain to me the use cases of both.
4
votes
1answer
60 views

Is it possible to access static resource of a managed package in a local VF page

Is it possible to access a static resource of a managed package in your local environment? Thanks
0
votes
1answer
203 views

Use Apex Controller variable into javascript in Static Resource

I have created a vf page and added some javascript into that vf page which is using controller variable : <apex:page controller="webstore"> <script> var username = '{!username}' ...
2
votes
1answer
96 views

apex:includescript in html

I need to include script in my community header page.for this I need to include html script in html page.what is the equavalent code of below in html <apex:includeScript ...
2
votes
3answers
75 views

Image not visible when viewing from the Community View

I have uploaded the image into the static resource and refer the image to some formula field. Its working fine. But when I am shifting the view form admin view to customer-community view the image not ...
1
vote
1answer
93 views

unable to display apex:image from zip resource?

I have created 'download_images' static resource in salesforce , within that i have uploaded 'snaps.zip' file. After uploading , i have given path according to the salesforce docs ...
2
votes
1answer
235 views

Check if static resource exists in custom formula fields

I have a custom formula field that shows an image using static resources. The resource to use is build using a field of the record: IMAGE('/resource/ImagesProducts/'+ ProductCode +'.jpg' , 'MyImage' ...
2
votes
3answers
195 views

Is there anything wrong with using Static Resource URL without the timestamp?

There is a question about getting the path to Static Resources dynamically in apex and it has some good answers. Here it is for reference. Dynamically get the path to a static resource However, ...
3
votes
2answers
1k views

Reference Static Resource in Zip File

I've been doing this: {!URLFOR($Resource.file,'0.jpg')} to reference from a visual force page a static resource inside a zip file, there are some files 0.jpg, 1.jpg, etc. at the top level of the ...
5
votes
2answers
340 views

which zip archive format (.rar or .zip) works with static resources without any issues?

I have created a .rar using winrar that contains images and upload as a static resource, but when i tried to access the images they are not displaying on my vf pages. I looked in "View Page Source" ...
8
votes
1answer
155 views

Salesforce1 referencing a static resource from another static resource

I have a VFpage that runs perfectly on the web. I do a lot of static resource reference from another static resource. What I mean by this is, I have zipped images and javascripts and uploaded as a ...
7
votes
1answer
293 views

URL rewriting for static resources

I know you can serve static HTML by uploading it as a static resource, but is it possible to create a URL rewrite rule for a static resource? Something like this if (url.startsWith('/coach')){ ...
1
vote
2answers
301 views

JavaScript file in a static resource [duplicate]

I have a two JavaScript (.js) files in a static resource. When I enter the full URL of a JavaScript file in the browser, ...
2
votes
4answers
256 views

Static Resource

How to get the path of js file in static resource. for ex: /resource/1301987741012/resourceName/JSFileName.Js what is this no. 1301987741012 .is it an Id of resource ?
2
votes
3answers
1k views

Linking to external CSS and JS inside your Visualforce Page

Is it at all possible to have <link href="http://jacobraccuia.com/styles.css">inside your Visualforce page and have it work when clicking the http://cs14.salesforce.com/apex/visualforce_page? ...
3
votes
1answer
196 views

In a managed package, how should you reference static resource images from css defined in a static resource?

The following works in my dev org and the packaging org, but not in an environment with the package installed: .edit-step-icon { background: url("png_list_edit_icon") no-repeat top left; ...
4
votes
1answer
92 views

How to save a universal value in a Salesforce Instance

I need to save a value in a Salesforce Instance which should be universally accessible (In VisualForce Pages, Apex Classes). An example would be to save the account ID to link all contacts (from the ...
1
vote
1answer
110 views

Is it Possible to access SDK From Static Resource?

If I have a SDK in .jar file can I upload it to Static Resource and call it in Apex Classes. As per Documentation it says I can able to call ".css" , ".Js" , ".Jar" Files in VF Page.
1
vote
2answers
616 views

Editing a Static Resource via Apex with Metadata API

I have recently found a way to create a Static Resource via the Metadata API - see this article. So, I was curious if it was possible to not only create a static resource, but to either: Edit the ...
0
votes
1answer
83 views

Is there any way (CSS, static resource?) to change the font size of all dynamic choices in Visual Flow?

I have been successful overriding the font size for different field labels but not the elements of my dynamic choice fields.
7
votes
3answers
580 views

What are the advantages/disadvantages of adding JavaScript libraries as a static resource?

I maintain a product on the AppExchange that currently references both JQuery and custom JavaScript that are included in a static resource. Now that I am making some additional updates to the package, ...
3
votes
1answer
292 views

Display PDF Stored in Static Resources in VF Page

I currently have a VF Page that displays a Link to a PDF stored in Static Resources. I am using this VF Page to override standard SFDC help. Users clicks "help for this page" | VF Page displayed | ...
4
votes
1answer
202 views

Can I get a compile-time reference to a StaticResource in Apex?

In Visualforce Pages, I love how we can do {!$Page.MyPage} or {!$Resource.MyFileZip} and get a hard binding to either, complete with namespace resolution and URL generation. In Apex we can do ...
1
vote
1answer
205 views

How to add sliding image to site.com

I am designing a site.com in this site i am trying to get 3 image from static resource and need to slide using jQuery. Is this possible? If there is any way to get the scenario done please guide me. ...
1
vote
0answers
69 views

Comparison/diff tool for the files in static resources with in eclipse

Is there any tool which compares the differences between the previous file and the current file in the static resources. Static resources have many files and many people are working on it. We need a ...
7
votes
3answers
416 views

Static Resources being loaded in different order

I am developing a Salesforce application that is using jQuery, jQueryUI and a custom plugin. The script tags in the page markup are in the correct order: <script type="text/javascript" ...
4
votes
1answer
111 views

Is there a way to access local static resource from a managed package

I have managed package which has a VF page which displays some images. I need someway for users in the installed environment to change the images to suit their requirements. I certainly know that we ...
2
votes
3answers
1k views

Include both Html page and its CSS content in static resources and reference in Visualforce Page

I have included the html page and its css content in static resource and I am trying to reference the html content in visualforce page.HTML file will be used as header and footer for all of my ...
5
votes
1answer
310 views

Embed content above Salesforce tabs

I was just checking out this app in the AppExchange, and I want to implement something similar in my own company: https://appexchange.salesforce.com/listingDetail?listingId=a0N30000005ueMvEAI Any ...
0
votes
0answers
150 views

Spell checker with Bjspell

Did any one tested spell checker in visualforce page with BJSpell .I have included the bjspell.js file in static resource and included the script in vf page with apex:includescript but still spell ...
3
votes
1answer
184 views

Can a static resource from a managed package be modified from installed env?

I have a static resource which is a zip file of images which i am accessing in my VF page which is a part of managed package. I want to have an ability of letting the installed org have their own ...
4
votes
2answers
287 views

Getting a static resource name from an object and use it in a VF page

I am building a managed package which refers to a set of images. These images would vary from each installation to another. So i was thinking of allowing the users to upload a static resource in their ...
2
votes
2answers
3k views

how do we access the image files from static resource in css?

I am trying to display images from a static resource in a css property. .PDF { width:50px; height:50px; background-image: url("{!URLFOR($Resource.FileTypes, 'png/pdf.png')}"; } What i ...
1
vote
1answer
248 views

Download demo excel sheet form static resource

I have uploaded an excel sheet into static resource of my environment. I have it as a demo for my product how to create a excel sheet for import records into sf. Can any body guide me how can i ...
3
votes
0answers
65 views

Including javascript in the top level window of Service Cloud

I'm working on an integration project that requires showing the Service Cloud from a .NET control. That control generally communicates via a javascript object on the top level window. The problem I'm ...