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

0
votes
1answer
37 views

Creating static resource in salesforce through java code

I am trying to create static resource in salesforce through java code. I am fetching the content of a file which is stored in my system and encoding it into base64 format and putting that content into ...
1
vote
1answer
18 views

URLFOR($Action… returns URL No Longer Exists from $Resource; works fine outside

Thanks to Marty C., I am able to create links in VF (with the JS defined in the page) that work in the Service Console (okay - still working on mailto:), and I want to move them to a Static Resource. ...
0
votes
0answers
7 views

Update Static Resource via apex controller

Is there any way to update a static resource body, which is of type 'text/plain'? I have tried out the SOQL query method, to update body, but salesforce is throwing a compile error for DML operation ...
6
votes
1answer
107 views

Using static resources in OnClick Javascript buttons after “Serve Static Resources from force.com domain” critical update

We're using list view and details OnClick Javascript buttons which reference custom js ans css files stored in static resources and containing some shared logic/styles. The sample code below ...
3
votes
1answer
29 views

Add a Javascript to my Home Page Components

I'm really new with Salesforce but I'm trying to add a Javascript to my Home Page components and I develop the Javascript which inject some values in the address (like Post code according with what ...
0
votes
0answers
13 views

Metaforce Static Resources

I am currently using the metaforce gem for deployment of source to a build org. I have a load of css and js files under a folder called assets. Is there a way to deploy these static resources using ...
0
votes
0answers
11 views

Use {!JSEncode(VALUE)} in Static Resource

I want to use JSEncode function in my Static Resource, as I would not be able to use it on my page due to some restrictions. Is there a JavaScript equiavalent function? Or, can we find it somewhere ...
1
vote
1answer
33 views

Add the attachment with image from static resource and value from text area field as pdf file

I generating the attachment from trigger action, Need to generate the attachment as pdf file, contains image from static resource and value from text area field. I have trying to use blob.toPdf() to ...
1
vote
0answers
54 views

Lightning - static resource deployment - javascript code

I am using the migration tool to deploy javascript files containing logic to display charts in a lightning component. To test my code I need to set the chrome developer console to not cache files to ...
0
votes
0answers
11 views

Force.com IDE takes forever to save JSON static resource

In my package I have a JSON file served as Static Resource. Whenever I change and save this file from a current version of the Force.com IDE it takes forever until its finally saved. I idles around ...
0
votes
1answer
55 views

Referencing the custom component in the static resource

I'm uploading a component and the controller class to the static resources and trying to use it in a vfp. But when I save the vfp with the reference, it throws an error that the component does not ...
0
votes
1answer
38 views

editing Static Resources in SalesForce

How can I edit Static Resources in SalesForce? While using css I need to edit and check it many times.
5
votes
2answers
181 views

document.getElementById('id').innerHtml = Static Resource Image

I have written one JS function on click of radio button, I want to show my Static Resource - Image file Help me out here **document.getElementById('id').innerHtml = ****************** My Static ...
0
votes
1answer
37 views

JS code on Button

Hello Guys i have a little tricky question regarding static resources. I have made a js code and now i want to use this js code on the click event of a button ?My question is that can we right this ...
1
vote
1answer
13 views

Querying particular static resource from complete pages in Org

I need to check for a particular resource in different VF pages.Normal method will be opening each page and checking for the static resource(Image/JS files) but is there any other probable method ?? ...
0
votes
2answers
42 views

Error with HTML tag for image static resource

I am getting an HTML tag output instead of the Image in a formula field. The image is stored as Static resource in salesforce. Can someone let me know the possible reason for the error and a way out ...
2
votes
1answer
465 views

Accessing Non-Static Variables in Static Methods of a Visualforce Controller

I have a scenario where I have one Vf page called 'myVisualforce' and a custom controller 'myController'. In myController I have some non-static variables for example 'var1' and 'var2' and I have few ...
0
votes
1answer
41 views

Control formula field display based on User

I have a requirement to display an Alert image that I have uploaded as a static resource to the User who is viewing the record only if the User is owner of the record. Can someone please guide me ...
2
votes
0answers
55 views

Is it possible to include a Mustache.js Template saved to a Static Resource within a VisualForce Page?

My VisualForce page includes the following Mustache.js template code: <script id="template" type="x-tmpl-mustache"> ...
4
votes
2answers
259 views

Is it possible to use Remote Object jsNamespace with an apex:includeScript?

Currently playing with An Example of Using Remote Method Overrides in Remote Objects My VisualForce Page includes the following <apex:remoteObjects jsNamespace="$RemoteContactModel"> ...
2
votes
1answer
62 views

Font file in zip static resource Cross-Origin Request Blocked

I have a zip file of fonts. These fonts are referenced in a VF page that renders as text/css. (src:url({!URLFOR($Resource.ZipFile, 'fonts/OpenSans-Bold.ttf')});) The URL resolved to the correct font ...
2
votes
1answer
231 views

Font files in Static Resources resolve to 404

I have a CSS file in the Static Resources and in that I have styles for specific fonts. These fonts are also in the Static Resources. If I paste the URL for the font files (ie. font.ttf) into the ...
0
votes
1answer
94 views

Why isn't this dynamic VisualForce page style toggling the Static Resources properly?

I'm currently looking at the Dynamic References to Static Resources Using Mostly, it works as expected, with one anomaly: When the page initially displays, as expected, it correctly uses both the ...
0
votes
0answers
22 views

How to reference a staticPath in Visualforce page

I am having a requirement to make the current file uploader work for IE8/9. Since IE8/9 doesn't support File API, I am considering using this: File API. However, it used this line in its example: ...
2
votes
2answers
235 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
72 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 ...
1
vote
1answer
160 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
136 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
196 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
155 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
90 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
114 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
149 views

Javascript Button Issue

Full .js button code: {!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")} {!REQUIRESCRIPT('/resource/' & LEFT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(TEXT(NOW()),':',''),'-',''),' ',''),10) & ...
5
votes
1answer
307 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
265 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
98 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 ...
3
votes
1answer
234 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
633 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 ...
4
votes
1answer
100 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 ...
8
votes
2answers
713 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
159 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
603 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
224 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
254 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
144 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
435 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
255 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
3k 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
387 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
251 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 ...