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
0answers
12 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
32 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
1
vote
1answer
39 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
131 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
40 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
34 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
14 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
32 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
19 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
19 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 ...
0
votes
2answers
51 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
145 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
100 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
57 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
67 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
718 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
37 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
84 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
71 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
38 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
282 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
75 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
26 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
34 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
74 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
101 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
30 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
107 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
47 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
343 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
49 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
15 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
87 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
994 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
51 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
107 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
543 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
97 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
573 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
133 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
26 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
472 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
88 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
229 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
200 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
284 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
219 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
136 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
129 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
176 views

Javascript Button Issue

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