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

5
votes
2answers
47 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
16 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 ...
0
votes
2answers
44 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
37 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
38 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
27 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
121 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
26 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
22 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
49 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
17 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
27 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
84 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
27 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
118 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
95 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
175 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
52 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
70 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
18 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
69 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
23 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
26 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
80 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
185 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
192 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
147 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
107 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
2k 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
42 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
109 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
133 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
49 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 ...
7
votes
1answer
525 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
90 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
30 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
48 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
111 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
125 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
1answer
36 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
143 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
61 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
440 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
51 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
17 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
126 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 ...
4
votes
1answer
1k 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
55 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 ...
3
votes
0answers
134 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
681 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"> ...