Questions tagged [static-resources]

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.

67 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
347 views

Uncaught TypeError: r[o].hasOwnProperty is not a function when trying to use a Static Resource

I'm currently working on a Lightning Component that needs a third party library when the library is loaded I get this error Uncaught TypeError: r[o].hasOwnProperty is not a function throws at /...
4
votes
0answers
74 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 ...
3
votes
1answer
207 views

Error when loading custom font in Community - 500 (Internal Server Error)

I've set up the fonts to load exactly as specified in https://developer.salesforce.com/docs/atlas.en-us.communities_dev.meta/communities_dev/communities_dev_customize_font.htm and they work most of ...
3
votes
2answers
3k views

uploaded zip files changing Mime type to application/octet-stream in static resources

I'm trying to upload a zip file in static resources. Even after selecting a .zip file to upload , the uploaded document is displaying mime type as application/octet-stream instead of application/zip. ...
3
votes
0answers
176 views

LockerService causes access error when managed package component tries to load js from its static resource

I turned on LockerService to test our Lightning components and I get the following error when loading a page. Our component is trying to load a .js file from its own static resource and it throws the ...
3
votes
1answer
239 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 ...
3
votes
0answers
420 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"> <tr><td>{{LastName}}</td><td>{{FirstName}}</td&...
2
votes
0answers
142 views

Load third party JS in LWC

I created a static resource with just one JS file. However when component rendered it gives me an error "undefined". Template: <!-- videoPlayer.html --> <template> <div class="...
2
votes
1answer
235 views

Issue to push static resource (single files and zip) using SFDX

have any of you faced issues to push static resources to scratch orgs using SFDX v46.8.0? Asking because I faced this issue and had to revert back salesforcedx plugin to 46.6.0. path\singleFile....
2
votes
0answers
40 views

Javascript in Static Resources for security review but requires parameter

I have a package that was submitted for security review which requires JS to be in static resources. Required: all script and style resources must be loaded through static resources Do not load ...
2
votes
0answers
127 views

Include static resource with ltng:require as it is

Let us start with the problem description. I am trying to incorporate d3.js into my Salesforce component. Here is the error I am getting: Uncaught TypeError: Cannot read property 'document' of ...
2
votes
0answers
33 views

Different community paths in different environments

I have different URL's in my sandbox and in my production environment. It is causing problems with my static resources in the css files. In my sandbox the community url is https://mydomain.com/...
2
votes
0answers
603 views

Access static resource image in lightning markup img tag

I have done my research on this and the solution is not working for me. Quick problem statement. I have Myresource that is uploaded as static resource. I am trying to access images under this in img ...
2
votes
2answers
200 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 ...
1
vote
0answers
29 views

Partner Communities and Site Prefix

Good day! I recently configured a partner community in a salesforce org and I found out that for resources to be working (either for loading or navigation) a site prefix should be appended in url. ...
1
vote
0answers
28 views

Image cannot be displayed because it contains errors

I have a page that contains images stored in static resources. They are inconsistently displaying. I just tried to manually display the image that isn't displaying. I receive the message: The image ...
1
vote
0answers
84 views

Unable to upload the LDS 2.10.0 as static resource

As we know that static resource has a limit of 5MB, I am trying to upload the LDS winter 20 as static resource, but its size is more than 5 MB https://lightningdesignsystem.com/downloads/ In this ...
1
vote
1answer
45 views

Alternatives to Static Resource

Our org has exhausted the limit of static resources. Mostly used in storing badge images for the certifications and exposed as a downloadable URL on customer community. I want to remove these images/...
1
vote
0answers
112 views

How to use static resource image in visualforce email template editor

I am using a public site and a public static resource to add images to a visualforce email template. But when I use this code: <img src="http://example.force.com/email/{!$Resource.logo_300}" ...
1
vote
0answers
709 views

Invalid reference of Static Resource in LWC Salesforce

I am trying to use Static resource inside the lightning web component. while importing getting this error:- "Invalid reference SDFCImages of type resourceUrl in file StaticResourceDemo.js" here how ...
1
vote
0answers
242 views

Alternative to custom settings in salesforce

I have a problem statement where I need to store a list of some 40 Parent Objects Ids statically. Further, if any one of the Parent Object's child records goes higher then 45,000(which is calculated ...
1
vote
1answer
331 views

Static resources unavailable when the community website is disabled

We have a public static resource Portal_bundle that contains the JS & CSS that is used on the community website The same static resource is used in a custom maintenance page that is displayed ...
1
vote
0answers
509 views

Static resource in lightning component

My zip file name is APIAI, it contains ApiAi.js. Path for that file is /APIAI/ApiAi.js I have uploaded it as static resource with name as chatbotApi and referring it in lightning component as ...
1
vote
0answers
24 views

Loading resources dynamically with a link or script tag for google chart allowed?

Our App did not pass the App Exchange security review because of the following issue JS not in Static Resource For jquery and datatables there is a officially accepted source file to load data ...
1
vote
1answer
903 views

Problem with static resource and Lightning Component

I am trying to use JQuery DataTables Library in a Lightning Component but I am finding problems with static resources. I upload three static resources (versions as DataTables Documentation): jQuery ...
1
vote
0answers
280 views

Static resource won't refresh

I have a static resource with is a Javascript file of about 1mb. After successfully uploading the file, and clearing the cache of the page that uses the static resource, it's still using the old ...
1
vote
0answers
158 views

View a PDF and TXT file from within an HTML static resource

So i have created a website in pure HTML 5, with some css's, jquery's and modals and locally on my PC it's all working great. I have some PDF and TXT files that i want to be able to view and it's ...
1
vote
0answers
649 views

Bootstrap static resource is not applying to page

This is the VF page I am trying to style <apex:page showHeader="true" sidebar="false" controller="ComposeEmailController"> <apex:stylesheet value="{!URLFOR($Resource.bootstrap, 'sf-bootstrap/...
1
vote
1answer
84 views

How to make org “tour”?

Can anyone give guidance on how to implement something like http://usablica.github.io/intro.js/ in a salesforce org? WalkMe is not an option, but trying to achieve something similar. To make my ...
1
vote
0answers
104 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
136 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 ...
1
vote
1answer
92 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
0answers
215 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 ...
1
vote
1answer
24 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 ?? ...
1
vote
0answers
166 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 ...
0
votes
0answers
9 views

Lightning Container NPM - no controller and/or function found

I am working with the lightning-container npm package and have a call in a React app uploaded as a static resource. This simply onClick, calls the LCC.callApex method as below. LCC.callApex("...
0
votes
1answer
13 views

How can I carry over my 'dynamic tag' when rendering as pdf from html visual force page?

I have a Lightning Component, that is iframing a VF Page which displays a plain text Static Resource. The VF Page has a text placeholder 'CONTACTNAME' that is replaced with Contact.Name which is sent ...
0
votes
1answer
224 views

Error on browser resize after using JQuery in a LWC

I am porting an existing app that uses JQuery to insert HTML into a Lightning Web Component when it is sent a formId via pubsub from another Aura or LW Component. The sfEnv object is for sharing data ...
0
votes
0answers
145 views

Display blob value in VF page and render as PDF

I am trying to display a PDF stored in static resource and passing the blob as a string to VF page and late rendering as PDF <apex:page controller="DataDisplayController" renderAs="pdf"> {!...
0
votes
1answer
19 views

Static resource not able to access global merged fields

{!$Component.idPageTestCase.idForm.idFocusedTab} This works well when it is there in Javascript tag inside visualforce page, but fails when the Javascript is moved to a static resource and the static ...
0
votes
1answer
50 views

Community header script - when is it loaded

Using lightning components, we want to load a script in our community from a third party. I put that script in a static resource, and now I need to be able to use it. Script: window.myScript = ...
0
votes
1answer
306 views

Web Component can't find variable `require`

I am trying to use the json2csv javascript package in my Salesforce Web Component, but I get the error: can't find variable 'require'. I've uploaded the json2csv package as a static resource and am ...
0
votes
0answers
39 views

No functions defined in JS files in a zip file uploaded as a Static Resource

I am attempting to use the D3 JavaScript library in a Web Component, but am having issues getting any method to work. I have downloaded the d3.zip file from the link above, and have attempted to ...
0
votes
0answers
83 views

Unable to upload static resources to sandbox

i have a sandbox on salesforce and i am pushing code there to test. i am also using some static resources which i have uploaded there. But this morning, when i tried to edit a static resource, i am ...
0
votes
1answer
767 views

How to use Salesforce Sans font in lightning component?

I have uploaded the Salesforce Sans font as satic resource in my dev org. How to use this sytle in my lightning component. <lightning:layout multipleRows="true"> <lightning:layoutItem ...
0
votes
2answers
548 views

How to call html content stored in static resource in lightning component?

I have a requirement where I need to store all the footer content(.html files) in static resource and use that in lightning component. I didn't find any documents where we can use the html content ...
0
votes
2answers
122 views

Static Resource fails to load on Child Component

I have the following parent component, child component, and static resource: //ParentComponent <aura:component extensible="true"> </aura:component> //ChildComponent <aura:component ...
0
votes
1answer
248 views

Image from static resource not working in formula

I have few images (Star01, Star02...etc) Which i clubbed to a Folder called StarsImg, Then i zipped this folder (Name of zipped File is same StarsImg). Now i have uploaded this zip file as Static ...
0
votes
2answers
184 views

Cannot add Static Resource

I am in a developer sandbox within Salesforce, and am trying to follow the "Build the Account Map Display" Trailhead. When I log into the sandbox and access "Static Resources", there is no "New" ...
0
votes
0answers
52 views

Can you reference a static resource from another package

I'm building a base managed packaged as well as an extension managed packaged. I have a static resource in the base packaged (a react resource) and would like to include it on a VisualForce page in ...