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.

Filter by
Sorted by
Tagged with
0
votes
1answer
19 views

How can I avoid error “sObject type 'StaticResource' is not supported.” in the Post Install script?

I am sampling data inside the Package Post Install script from a Static Resource, but script fails with an error: Error Message: common.apex.runtime.impl.ExecutionException: sObject type '...
0
votes
1answer
11 views

How to add these js files that another js file depends on for my Visualforce page?

I'd like to use a JS tool, but it needs some additional files. The readme says I Should add a few files to the server. I tried by adding it in static resources and modifying part of the js tool so it ...
0
votes
0answers
24 views

Difference in loading css from static resource and using css inside folder structure in LWC

I am trying to use the below custom datatable where we can add picklist https://live.playg.app/play/picklist-in-lightning-datatable In this all the css has been added to static resource and it is used ...
0
votes
1answer
19 views

Hide Standard Page Header

I know this question is duplicate of the following: Hide Standard Page Header in Custom Lightning App page. The problem is that the solution of creating a static resource and using it in the LWC ...
0
votes
0answers
33 views

LWC JS loadScript

I am trying to load this JS script: http://cdn.tagcommander.com/3468/tc_ENGIE_iframe.js So I downloaded it as static resource and use loadScript in LWC: import { loadScript } from "lightning/...
1
vote
1answer
36 views

loadScript fails in Community: Failed to load resource: the server responded with a status of 503 (Service Unavailable)

I am loading a JS file in a LWC with: import { loadScript } from "lightning/platformResourceLoader"; connectedCallback() { loadScript(this, "/resource/simpleTest") .then(...
4
votes
1answer
91 views

Make Visualforce variable in Javascript pass Security Review

The following Javascript is embedded into a Visualforce page because it relies on Visualforce variables: <apex:page controller="myController" > <script> var foo1 =...
6
votes
1answer
151 views

Package review fails with new undocumented issues

My Managed package (yearly) Security Review failed with new issues I was not aware of and which I could not find documented anywhere, E.g.: Stored XSS - "Avoid using escape=false unless ...
0
votes
1answer
28 views

Typing effect JavaScript not working with Visualforce page

I have a static resource JavaScript file that is referenced via <apex:includeScript> that displays a simple typing effect on the VF page however it is not working when previewed and displays as ...
0
votes
2answers
26 views

Using MultiStaticResourceCalloutMock [duplicate]

I am working on a class that makes a callout to a third party API. The third party API needs to be authenticated with a OpenID Connect Auth token. So, in my class, I am making a callout to the OpenID ...
3
votes
1answer
87 views

Embed HTML in LWC using iframe

We are developing an AppExchange app in which have an HTML file under static resources. Inside the LWC component, we need to display the content of this HTML file. We are currently using the tag and ...
1
vote
1answer
59 views

Importing third party JS in LWC is not working

I am trying to integrate tinyMCE editor with LWC. I have followed the below steps to do so; Download the tinyMCE resources and uploaded it as static resources in my org I am using the loadScript ...
0
votes
1answer
23 views

@wire and static resource JS library

Here's my problem; when i initiate my LWC sometimes it works fine....sometimes the static resource obviously doesn't load before the @wire fires off. @wire(fetchEvents, {usrId: '$userId'}) ...
0
votes
0answers
13 views

Pointing the YouTube Iframe API script to a locally available static resource

the Iframe api script tries to call-out to the widget api script to load it in. In the example available on the Salesforce Dev Blog, the author seems to have edited the callout to point locally. Here ...
3
votes
1answer
119 views

How can I force a static resource to reload in a Community site?

I have a static resource bundle (MIME Type: application/x-zip-compressed) which contains my .css and .js files. I have noticed that when I upload a new version of the static resource it can take a ...
9
votes
0answers
111 views

Font Awesome fonts are not being loaded after “Enable Secure Static Resources” activated for testing

Recently I have encountered the feature "Enable Secure Static Resources" on the release update (that was already being postponed as I am writing this) and read this question talking about it ...
0
votes
0answers
26 views

Static resource is not uploading files

We have multiple post-deployment steps and Data uploading is one of the post-deployment steps. We have created an automation script to upload the data file from the static resources. We have Company ...
14
votes
0answers
793 views

What is the impact of the Release Update: “Enable Secure Static Resources for Lightning Components”? (due 2020-11-29)

On the Release Update page in the setup (/lightning/setup/ReleaseUpdates/home) I found this Enable Secure Static Resources for Lightning Components COMPLETE STEPS BY: 29.11.2020 TEST RUN SUPPORTED To ...
2
votes
1answer
110 views

Using third party javascript library in LWC without a static resource

My question is similar to this. It seems we need to upload the Javascript library as a static resource before we can use it in LWC. I've got a payment gateway JS library which I need to use via CDN ...
1
vote
1answer
73 views

How to write to static resource (text file) in Managed package

How to write to a static resource (text file) in a Managed package In my developer org, I can read and write a static resource file by a visualforce page. I make a managed package of them, then ...
0
votes
1answer
92 views

Image stored in Static resource not getting displayed in lightning component

I have a lightning component that shows the image of a car from the static resource. I have uploaded this zip file which contains images of cars as a Static resource. following is the code of the ...
0
votes
0answers
19 views

Include managed static resource in Vf page [duplicate]

I have installed a managed package that has some static resources along with other features. I want to include a static resource to my vf page, but i get an error message: "Error: Field $...
0
votes
0answers
28 views

SFDX Source retrieve duplicating folder this happen only in static resources folder

In staticresources folder, i have Theme folder force-app/main/default/staticresources/test_Theme/css/style.css If i try to retreive style.css file, this file will replace to what's inside test_Theme....
1
vote
1answer
28 views

What is the best method to display images on a VisualForce page?

Is it still best to use Static Resources to zip up images to use in a VisualForce page (or elsewhere)? We basically display a table on the page with a small image (a company logo) in each row. ...
2
votes
1answer
49 views

Static Resource in VisualForce Page

I am using google Re captcha in my Visual force Page as below <apex:page sidebar="false" showHeader="false"> <apex:slds /> <html> <head&...
0
votes
0answers
44 views

Inactive page for community won't display static resources

I am developing a VisualForce page using the below css and html. While I've double and triple checked that the resources are in the org, public, and properly referenced, when I deactivate the org ...
0
votes
2answers
195 views

LWC loadScript of Static Resource works on Local Development Server but not when deployed to Sandbox

I used FullCalendar package to develop a rather simple LWC which includes a single DIV where the package dynamically loads it's elements. <div id="calendar" lwc:dom="manual" ...
2
votes
1answer
43 views

Can I import javascript from outside of my managed package into a LWC in my package?

In our managed package, we have a particular page where we have some default javascript that runs some calculations on some fields as you type and I am in the process of converting this page to LWCs. ...
0
votes
1answer
70 views

How to get a static resource URL to work in a Community without a gack?

I have a static resource that opens fine using this URL from the normal Salesforce desktop where the domain is https://flow-flow-3628-dev-ed.lightning.force.com): /resource/1594633705000/...
0
votes
0answers
35 views

Problem with custom font in Visualforce Page

I am trying to apply a custom font to my visualforce page. I followed the steps laid out in Use Custom Fonts . I have no idea what's wrong. Here's my css definition: @font-face { font-family: ...
0
votes
1answer
57 views

how to set component attribute value in static resource css

problem : I have to set values of css dynamically . I upload css file in static resource css is like : p { font-size : {v.font_size} } component : <aura:attribute name="font_size&...
0
votes
0answers
60 views

Issue with load Static Resource to Aura component

I have a folder that I compressed to ZIP and I want to import it to my aura component, but the "afterScriptLoaded" is never call. <aura:component implements="force:appHostable,...
0
votes
0answers
14 views

Document/Static Resource URLS in Email Templates in Source Control

Let's say that I have a Document or a Static Resource which stores an image that I use in an email template. The .email file within my project directory will have something that looks like this: <...
1
vote
1answer
365 views

LWC: Issue with loading static resources

I've incorporated the code documented in the following article into a new component: Play YouTube Videos Through Lightning Web Components It seems like the two JS files referenced, iframe_api.js and ...
3
votes
1answer
53 views

SRC reference inside lightning components

Here is the css reference, I have uploaded the font to the static resource, the source org showing up the correct font face but once I package the app (yes I included the static resource) to the ...
17
votes
7answers
1k views

Custom Metadata vs. Custom Objects in Managed Package

I worked on Managed packages for nearly 10 years now and never missed Custom Metadata Types. Not before they came and not after they were announced. I didn't come across a single great and technical ...
0
votes
0answers
38 views

Accessing static resource from ZIP file in Aura component

I Uploaded a JQ_UI.zip file. Structure shown below: JQ_UI.zip - jquery-ui.min.js -jquery.ui.js -jquery-ui.min.css Aura component: <ltng:require scripts="{!join(',', $...
0
votes
1answer
51 views

upload icon is not applying for use tag in lightning component

I have uploaded Icon's in static resource as a zip format and when i am trying to get upload icon from them while saving component it is throwing error. No function found for key: URLFOR: Source <...
1
vote
0answers
277 views

How to make font-awesome icons work on Lightning Web Components?

Downloaded the latest version of the Font Awesome Icons as a .zip file, I extract the files and uploaded the file all.css as a static resource in my scratch org. Below is my html <i class="fab fa-...
0
votes
1answer
102 views

Custom Font in Community not Loading via custom Domain

We have a Community that has a custom font set as primary font. This works fine when we access the community via its default force.com URL. However, we also set up a custom domain, and when we ...
-1
votes
1answer
46 views

CSV parser to insert records into Custom Object

I have a requirement to insert records into custom object called Custom_Business__c using a csv file which is stored as a static resource. Below is the code I've achieved so far public class ...
0
votes
0answers
163 views

Static Resource CSS not loading in a Community

I just did a sandbox refresh from our production sandbox, and I am trying to make sure the community still works. In the community in production, we added static resource css files to the markup head ...
1
vote
1answer
194 views

Can we add static resource image in lightning treegrid?

COMPONENT: <lightning:treeGrid columns="{! v.gridColumns }" data="{! v.gridData }" keyField="name" expandedRows="{! v.gridExpandedRows}" aura:id="mytree" /...
0
votes
0answers
53 views

Custom labels in static resource

I am trying to make the data-sitekey into custom label. The datasitekey is in the static resource file. I created a custom label name sitekey. Earlier I was hardcoding the site key and it was working ...
0
votes
0answers
126 views

Loading Static Resource into Lightning Component

I am trying to access the test.png file from my static resource into my css of a aura component. Working CSS: background:url('/resource/158765027200/test'); //resource path achieved using {!$...
4
votes
2answers
389 views

LWC: Import JSON from a zip Static Resource

The platformResourceLoader module only offers loadScript and loadStyle. Is there a way to load JSON files from a zip Static Resource?
1
vote
0answers
124 views

Accessing files containing whitespace from a zip Static Resource in Apex

There is a known issue with zip Static Resources that prevents files with whitespace in their names from being extracted (I suppose the Static Resource web service on SFDC cannot handle whitespaces). ...
0
votes
0answers
366 views

Can't import static resource in LWC

I've been trying to access static resource in lwc but I can't use @salesforce because it gives me an error of "scoped imports not allowed when a runtime namespace is specified : lwc". I simply can't ...
0
votes
1answer
23 views

Firing a js event on afterScriptsLoaded when tab selected

I have a lightning component (inside another component) that loads chartJs resource and I am using afterScriptsLoaded to manage all de graph presentation logic. It works perfectly except for some ...
0
votes
1answer
81 views

How to put a static resource (including loading the same) and related code on a service component and use it on Lightning web component?

I'm trying to understand how can I put javascript static resource and related code on a service component (including loading the resource) and then use it on Lightning web component. Please note ...

1
2 3 4 5
8