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
12 views

Bulk Testing with Static Resources

Our team is integrating static resources into our unit tests and were not sure about bulk testing. I have a couple of questions: Would bulk testing be done through code or through adding additional ...
0
votes
0answers
19 views

Datepicker using Static resource

I have used the below code for the compatibility of browsers for displaying the date picker and its working fine <script src="//cdn.jsdelivr.net/webshim/1.14.5/polyfiller.js"></script> ...
2
votes
2answers
84 views

accessing static resource in apex

I know that we can access static resources in visualforce page as follows; {!URLFOR($Resource.UploadTemplate)} How can we access the static resource in APEX class? And if it is in a zip file, how ...
0
votes
2answers
22 views

How to download/extract Static resources files which is already available in Salesforce

I want to download the static resource files from one of the salesforce environment and need to upload those static resource files into another Salesforce environment, But I don't see any options to ...
0
votes
1answer
16 views

Can I upload this SalesforceSans font as a static resource and then call it in a VF page?

I've downloaded the Lightning Design System and I'd like to just upload the SalesforecSans font to my dev org for now, preferably as a static resource. Is this possible? How would I then call this ...
0
votes
1answer
23 views

Import CSS not working in Static Resource

I am trying to import CSS within a CSS file, from a static resource folder. But it shows an error and none of the style in displayed on page. Also, the folder is not displayed in Source folder in ...
2
votes
0answers
37 views

Using static resource in test class in order to test HTTP callout. Seems broken after update 1st of january [closed]

I'm using static resource in the code below to mock a httpcallout response. It seems like the update 1st of january did break the link - has anyone else experienced same issues? My question is then ...
6
votes
1answer
120 views

AJAX load JSON from static resource

I am trying to load a JSON file into my VF app via AJAX. It currently sits in a zipped static resource, like such: myResources | |js | |target.json ...
0
votes
2answers
53 views

Getting an image from a salesforce url using an apex controller

I am trying to get an image located at https://na1.salesforce.com/servlet/servlet.FileDownload?file=00P24000002sSRUEA2 in an apex controller and it complains about authorization..Below is my code ...
0
votes
2answers
31 views

Static Resource Conditional Image Display in PageBlockTable

This is the name and path of Static Resource (ComplianceImage.Zip) File "ComplianceImages/Yes.png" , "ComplianceImages/No.png" etc..I am unable to display image in column. Pls help <apex:column ...
1
vote
3answers
106 views

Can we include the js file and css file in visualforce components?

Here is my scenario, I want to include the css and js file, these are stored in static resources. I need the syntax and how to use these classes and styles defined in css file.
3
votes
0answers
267 views

How can I load an image in lightning without including the namespace?

I'm trying to include an image that I loaded as a static resource in a Lightning component. The image doesn't show up if I don't include my namespace. For example, this won't work: <img ...
1
vote
1answer
30 views

Is it possible to set the HttpMethod with MultiStaticResourceCalloutMock

I utilize a rest API from our vendor that has the same endpoint but utilizes different Httpmethods (get,put,post,delete). Is it possible to set the HttpMethod when setting up the endpoint as well?
0
votes
1answer
47 views

Javascript Static Resource Cannot Be Found

I feel like this is a dumb questions but I'm in circles right now trying to figure out what I'm missing. I added a javascript static resource to a folder called VisualForceElements like so: Then ...
3
votes
2answers
40 views

Visualforce page shows CSS errors for the same styling used by a html template

I downloaded a free html responsive template from the web and trying to convert it to a visualforce page. The page I am trying to reproduce is blank, so there is no content except css, js and nav bar. ...
0
votes
2answers
47 views

Re-routing to Static Resources with Site's UrlRewriter resulting in 404

Our public website has some links to downloadable PDFs. We'd like to use "pretty" URLs, but for some reason we're getting a 404 error when using the Site's UrlRewriter. The resource itself is ...
-1
votes
3answers
65 views

How to upload a folder as a Static Resource instead of Zip

Is there a possibility that we can upload the folders as Static Resources in Salesforce? I am sure there should be way via Eclipse, by changing the MIME Type in the corresponding MIME Type. What ...
0
votes
2answers
69 views

How to refer my static resource zip file ( CSS & Img) in VF Page?

I have a Static Resource (Hardcoded URL) and a VF page for that. I want to get rid of the hard coded values and refer the static resource in my VF page. In order to do that i created a zip file of ...
5
votes
2answers
133 views

Accessing Visualforce static resources from local machine

FINAL UPDATE: just in-case if anybody else is looking the error message solution which I was getting is due to the fact that: When you get a share link, the link points to a web page that displays ...
3
votes
1answer
45 views

Files in zipped static resource return 404 errors after being updated

After saving a change to a file in a zipped static resource, all of the files in that static resource return 404 errors. If the changed files that caused the problem are added to another zipped static ...
-1
votes
2answers
352 views

How to use google material icons as static resource

I'm stuck with using Google Material Icons as static resource in Visualforce page. Using CDN i am able to see the desired results but can't get it done via static resource approach. So far i followed ...
0
votes
1answer
124 views

How to get page's static resource URL string using JavaScript code?

I want to get URL string of Salesforce static resource in JavaScript code. Something like: var url = getURL('static_resource_name') Is there a method to capture this from a page using JS?
0
votes
1answer
132 views

Create static resource with apex code

Is there a way to create a StaticResource within a Apex code. this the code i am doing: StaticResource sr = new StaticResource(); sr.Body = file; sr.Name = 'testLicence'; ...
0
votes
2answers
55 views

What is the difference between static resource and visualforce components?

I know the hardcoded scripts and style codes can be stored in static resource and vf components and can be used in vf page. But what can be the exact difference between these two since both are doing ...
8
votes
2answers
244 views

Access Custom Setting global variable from Static Resources

"{!$Setup.MyCustomSet__c.URL__c}"; I'm using the above to access custom setting on the page. But when I move the script to static resources and try to access it from there the value is not being ...
1
vote
1answer
47 views

How to use javascript in static resources and then to refer in VF Page?

This the VF page code : <script> $(document).ready(function() { // SUCCESS AJAX CALL, replace "success: false," by: success : function() { ...
0
votes
0answers
23 views

Use image from Static Resources as App Logo [duplicate]

Is it possible to reference an image in static resources as an App Logo, instead of having to reference a file uploaded to Documents? What I'm trying to do is remove any and all metadata dependencies ...
-1
votes
1answer
189 views

use javascript function in list button onclick javascript

In a List button, i execute javascript code, and for this i defined a static resource where i implemented some functions and i included my resource this way : ...
1
vote
0answers
43 views

Mavensmate - Deploy only changes to static resource

I am currently having trouble with deploying static resource using mavensmate. I have a static resource with a lot of images. But the only thing I'm changing is the CSS and every time I deploy the ...
1
vote
1answer
39 views

Static resource naming convention

Is it a good practice to include version information along with the name when you are uploading a static resource. For example, I am uploading a file "Bootstrap-3.3.5.zip" in static resource, Shall I ...
5
votes
1answer
90 views

Does SFDC serve the entire zip static resource, or just the resources referenced?

When I inspect a page in Chrome/Firefox, I don't see the entire zip file as a requested resource. Only the files referenced are served to the client side. Does SFDC unzip resources server-side before ...
0
votes
0answers
36 views

Managed Package Static Resource URLFOR redirect

It seems that following activation of the Summer '15 critical updates that when accessing static resources that are part of a managed package then although the URLFOR now resolves to a relative ...
0
votes
3answers
384 views

Display HTML from Static Resource in VF Page

I have a HTML file in Static Resource, which I need to display in one of the sections as an overlay in Visualforce page. How can this be achieved? I tried including directly, did not seem to work
3
votes
1answer
141 views

Is it possible to include js files from static resources into listview onclick JS button?

Is it possible to include js files from static resources into listview onclick JS button? REQUIRESCRIPT can't be used anymore for static resources because of this Known Issue that won't be fixed. The ...
1
vote
3answers
274 views

How to replace hardcoded javascript with static resource?

In my page, the javascript coding is as follows <script> function validationcomplete(){ var strg1=document.getElementById("Endereço").value; var ...
1
vote
1answer
63 views

javascript in static resource

I have written a javascript function whose purpose is to open a case in a primary tab.The idea is to access this function in VF Page through but i'm unable to do it.When i'm opening the page microsoft ...
1
vote
2answers
181 views

How to reference static resource in <style/> block

I have a block that references a background image, that is in my static resources. The example I am going by is : background: url(../img/myimage.png) no-repeat; but i get the following error: ...
0
votes
0answers
20 views

Want to access static resources from outside of Salesforce via the API through an external website.

I need to be able to access static resources from outside of Salesforce via the API through an external website. How can I achieve this ?
3
votes
1answer
150 views

Can A Static Resource Be Accessed From Site?

Pretty simple question. I have a VisualForce Page on which I have the following line: <apex:stylesheet value="{!URLFOR($Resource.MyStyleSheet)}" /> When I access this page via a SiteIt's not ...
1
vote
0answers
25 views

REQUIRESCRIPT and static resources in list onclick javascript button after “Serve Static Resources from force.com domain” critical update [duplicate]

I just want to raise the problem again. The issue with loading static resources using REQUIRESCRIPT in list onclick javascript button can be reproduced again in Summer 15 preview. Anyone else can ...
0
votes
1answer
43 views

CSV as Static Resource, Windows and newline characters not recognized

In our application we use Static Resources to store CSV files that contain record definitions. We have a CSV parser in Apex which usually works fine and correctly reads and upserts records when we ...
1
vote
2answers
194 views

Download pdf and video file from html page

I am stuck at a point where I have to give a link to the user on the UI which on getting clicked will download a pdf and video files. I have placed these files as static resources and I am trying to ...
1
vote
2answers
245 views

Home Page Component - Summer 15 issue

I was using HTML component in home page component for advance search functionality in Narrow (Left) Column of Home Layout. My HTML component was <script language="JavaScript" ...
3
votes
1answer
405 views

Referencing Static Resources URL in AngularJS App

I need to use some icons in static resources in an ng-grid table. I wonder what is the best way to make use of the platform's url resolving. If I put the code src="{!URLFOR($Resource. in Javasript ...
2
votes
1answer
310 views

Visualforce: Can't access archived static resource

I'm trying to access some static resource in my visualforce page. I have uploaded a zip file named pqGrid. It's structure is like so: - pqgrid.min.js - pggrid.min.css - images/ --image1.png ...
1
vote
2answers
211 views

Bootstrap 3 VF javascript not working

I am trying to implement the bootstrap accordion feature: http://getbootstrap.com/javascript/#collapse-example-accordion So I upload the static resource and included in my VF tag But when I ...
1
vote
1answer
5k views

Disable autoplay on a video played in an iFrame from a static resource

I have an mp4 training video that I am trying to add to my Account page layout via an inline Visualforce page. The video is stored as a static resource (Create_New_Contact). I have successfully ...
2
votes
2answers
61 views

Loading HTTP resource in Visualforce pages

Is there a way to allow loading of non secure resources from external sites in Visualforce pages? Below is the scenario I have. I am creating a force.com site page. The template I received for the ...
0
votes
1answer
157 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
262 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. ...