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
1 vote
1 answer
157 views

Trouble loading PDF.js lib in LWC

I have trouble loading the PDF.js library in my Lightning Web Component. Whenever I load the page with the component, I get : PDF.js could not be loaded undefined Twice, this additional error popped ...
Domovyak's user avatar
0 votes
2 answers
77 views

Does Loading Static Resource Dynamically through URL pass the Salesforce AppExchange Security Review

We have created a Second Generation Managed Package and in it we need to load the static resource which is uploaded by the Subscriber (the one who installs the package). We have loaded the static ...
S1th's user avatar
  • 69
1 vote
1 answer
160 views

How to fetch value from Static Resources

I am new to LWC and i have a Opportunity picklist StageName, i have stored stagename value changed to different language in static resource, now i want to fetch value from static resource and display ...
shruti rawat's user avatar
0 votes
1 answer
26 views

Managed Package- Static Resource Cache Control

I know how 'Cache Control' setting on static resource works. What I don't know if there is any impact on managed package future releases. Does the 'Cache Control' setting on Static Resource have any ...
Asif's user avatar
  • 24
6 votes
1 answer
378 views

How to get Static Resource URLs dynamically in LWC that work in LWR sites

TL;DR In case you aren't into reading walls of text, here's the question in a nutshell: Is there an API in LWC that can get a static resource URL dynamically in an LWR site? Please note that, in LWR ...
JDB's user avatar
  • 660
0 votes
1 answer
165 views

Deploy Metadata with Apex Testing Error

I am trying to deploy Omniscript which is stored in a zip file inside a static resource. I am following this documentation here. Here is the code - ` public class MetadataDeploymentCurl { public ...
Chinmay Agrawal's user avatar
0 votes
2 answers
109 views

URL for PDF file in a static resource zip file

Can I get the URL for a PDF file in a static resource zip file? The file I am trying to access is in a static resource called BRLShort on https://niimbl.my.site.com. The PDF name is brl.pdf.
Michele Kleinhomer's user avatar
0 votes
1 answer
184 views

Unable to load FullCalendar JS Library in lightning component

I am using FullCalendar JS Library V6 (lastest version) to build custom calendar for a requirement in lightning component. I have created the static resource and included the static resource in ...
Rohan Thakur's user avatar
0 votes
1 answer
115 views

SonarQube issue for method from static resource

There is a static resource in the org like below: myStaticResource.js (function() { function someMethod(eventData, cmp) { //Do something } window.someMethod = someMethod; })(); ...
वरुण's user avatar
0 votes
1 answer
248 views

Get a List of Images from static resource to LWC without naming them specially

I have a static resource that contains multiple icons in a zip file, and I want to use them dynamically for each product in a table in LWC. The product's icon is determined based on a product_type__c ...
Salvation's user avatar
  • 1,137
2 votes
1 answer
388 views

Static Resource with Cache Control set to Public is not Loading on external website for external users

We are deploying Salesforce chat with Embedded Service deployments. Currently when users without access to SFDC view the chat, all of the Salesforce images show up as broken. Below is an example of a ...
Matthew Metros's user avatar
0 votes
0 answers
52 views

Is there a good mechanism for making small images such as logos publicly available?

I read that "public" static resources are only accessible if already cached which probably explains sporadic results I've had: Public specifies that the static resource data cached on the ...
Keith C's user avatar
  • 135k
0 votes
1 answer
729 views

How to import Excel files from static resources using Loadscript in LWC?

I am trying to import an Excel file from static resources. But it's not working. The same method is working for JS files. Note the excel file is in xlsm format. Please help. JS: import { ...
Praveen Behera's user avatar
0 votes
1 answer
157 views

LWC Model Height/Width Issue

I have created a custom quick action model which has custom min-width defined in Static resource CSS. i have loaded that static resource using loadStyle(this, QuickActionFullScreen); in renderCallback ...
Hitesh Chaudhari's user avatar
0 votes
0 answers
232 views

How to use static resources in LWC from Image url in communities

I am trying to use static resources from a custom object called Site config which stores some information to be displayed as cards. I am displaying data from custom fields and am also displaying an ...
bharath kumar's user avatar
0 votes
1 answer
61 views

Lightning Design System SVG example doesn't show up if included in a static resource

We would like to implement an LWC that would use the https://www.lightningdesignsystem.com/components/illustration/#No-Task no task SVG image. <template> <div class="slds-...
Patlatus's user avatar
  • 16k
0 votes
0 answers
88 views

LWC and Carbon Charts

We use Carbon Charts in our non-Salesforce product and would like to leverage existing code, if possible. It's nice library. Here's what I did... Added this file... /force-app/main/default/...
nstuyvesant's user avatar
0 votes
1 answer
575 views

How to use static resource image without import in LWC Dynamically

I am calling a apex controller in lwc component to get the required image's static resource name & I want to use that Image in LWC component. Since I can't import the independent static resouce ...
Shubham Jangid's user avatar
0 votes
0 answers
39 views

Need to merge required js files in one js file

We are using a js library in our vf page by referencing the static resource where it is stored. While upgrading to its latest version, the js file has many dependency on the required js files in its ...
goose's user avatar
  • 71
1 vote
1 answer
404 views

PapaParse in LWC after Winter '23 heightened security?

I am trying to use PapaParse (a Javascript CSV analyzer library) in a Lightning Web Component. A lightning modal hosts the tool. Although I have seen examples of doing so in the past, I have been ...
skycafe's user avatar
  • 377
0 votes
0 answers
219 views

Issues loading Google JS library in LWC

I am trying to load the google places library into an LWC. I ripped the js from the src url(below) for a normal google script tag and loaded it as a static resource. https://maps.googleapis.com/maps/...
SMH_RI's user avatar
  • 1
3 votes
2 answers
3k views

Activities standard component UI is changed with spring 23 release

We have standard activities component on record page. The UI for that component is as below for scratch org which does not yet have Spring 23 release: As salesforce spring 23 release coming we have ...
Jason Rickert's user avatar
2 votes
0 answers
537 views

When to use which: Static Resources VS Asset Files

Static Resources and Asset Files seem to serve same purposes to me because they both can be used for coding, branding, and design. What are the differences between these two? What are the best ...
Xin's user avatar
  • 137
0 votes
0 answers
151 views

css 404 not found for static resources

I have used custom css in my salesforce application, custom css uploaded to fonts and its working when user logins but its not working if user refreshes the page. Because the font is available in ...
Jyothi Subhaiah's user avatar
0 votes
1 answer
305 views

Aura Component's <ltng:require> scripts not always loading

I am trying to add some drawing capabilities to the dreamhouse-lwc's auraPropertyListMap. The aura component uses the leaflet library, so I added the leaflet.draw plugin to the ltng:require. The ...
Jason Swan's user avatar
2 votes
0 answers
229 views

Are Static resources only accessible after a user has been authenticated?

I am displaying favicon in the Digital Experience Site. The favicon displays correctly. However what I am observing is that while the Login Page is loading the browser displays the salesforce logo ...
GroundToCloud's user avatar
0 votes
1 answer
543 views

Prevent hardcoding of Static Resource URL

<link rel="shortcut icon" href="https://xxxx--devi--c.sandbox.vf.force.com/resource/1111111101000/faviconname" type="image/x-icon" /> Is there a way to dymanically ...
GroundToCloud's user avatar
3 votes
0 answers
283 views

Implementing jstree library with Lightning Web Component

This will be a long one, hoping someone can help. Problem Summary: I'm unable to integrate the "Drag and Drop" (dnd) plugin functionality with my LWC that utilises the jstree library (https:/...
BenBates's user avatar
  • 191
0 votes
1 answer
143 views

Why is my JavaScript working when it's placed directly in my visualforce page, but not as a static resource?

I have a visualforce page that starts like this: <apex:page controller="FilastController" standardstylesheets="false" showheader="false" docType="html-5.0" ...
JVZ's user avatar
  • 17
1 vote
1 answer
166 views

Test.loadData executeBatch Unexpected Exception

I'm writing some test cases for a custom class that interacts with a custom LWC that requires fields from SF contacts. I'm attempting to load test data from a static resource using Test.loadData as ...
Nicholas Shepard's user avatar
5 votes
1 answer
3k views

LWC loadScript from static resource with export inside

I have a js library that I created static resource for it: The js library content (the calc.js file for example) like export default calculate = function(x,y){return x+y;} In LWC, I import the static ...
khoa_chung_89's user avatar
0 votes
1 answer
141 views

Field Integrity Exception occures when importing library in js controller

I'm trying to import pdf.js to my controller. I've created a static resource called "pdf" and attached pdf.js file to it. Then I'm trying to import that with ES6 import keyword but when I ...
user avatar
-2 votes
1 answer
111 views

What is the best way to gather salesforce data on org limit / static resource usage using REST or SFDX CLI [closed]

I want to keep track of our SF org portfolio/governor limit usage over time and am looking for a way to gather that data in real time. Is there a way to gather info on limit usage such as: Lookups on ...
snarulaFF's user avatar
0 votes
0 answers
755 views

Third Party Library DOMPurify on lwc - Failed to execute 'createNodeIterator' on 'Document'

I'm trying to load DOMPurify in lwc in order to sanitize some data, but I cannot find a way to make the library work. I've tried with the minified js file as static resource, with the full files, and ...
TEo's user avatar
  • 63
0 votes
0 answers
208 views

Trouble loading static resource in LWC [duplicate]

I want to use these dialog-samples in my project. I downloaded js and css files, packed into zip and uploaded as static-resource. Trying to use it, I receive ReferenceError: Dialog is not defined. How ...
Maciej Król's user avatar
0 votes
0 answers
136 views

Salesforce static resource image upload via Mule4 not displaying

I have to upload images to static resources via mule 4. The code works fine without any error but the image not displaying in salesforce static resource. I'm getting 200 responses instead of 201. When ...
Zusee Weekin's user avatar
0 votes
1 answer
8k views

Can we insert an image in lwc cmp without using static resource?

Is it possible to add an image in a lightning Web Component w/o using static resource?
Gargi Gupta's user avatar
0 votes
1 answer
201 views

Update variable in a JS Static Resource

I have a js library uploaded as a static resource that I am using in my VF page. This library has a "config" object which contains server info etc. The problem is that I need to update the &...
Badar's user avatar
  • 45
0 votes
1 answer
820 views

How to obtain updated static resource referenced by LWC in Communities/Experience page?

After updating a static resource and importing it using import nameOfResource from "@salesforce/resourceUrl/nameOfResource";, only the FIRST version is what is obtained and not any ...
Jay's user avatar
  • 55
-1 votes
1 answer
143 views

Create wrapper LWC for javascript static resource?

I want to use a Javascript library to process some information without reimplementing the entire library in apex is there any way I could embed it in a web component then access it via post method? I ...
KarlLivesey's user avatar
3 votes
1 answer
3k views

How do I import and use js static resources in LWC?

I'm trying to use a static resource in a Lightning Web Component. The component is embedded in a Sites (formerly known as Communities) Page, in case that matters The relevant code in the static ...
SarcasticSully's user avatar
2 votes
1 answer
2k views

Public static resource not visible

I created a static resource and set the Cache Control to Public. However, when I access the static resource URL directly, I get the Salesforce login page. Here's the URL I'm using: https://someorg--...
Michael Sobczak's user avatar
4 votes
1 answer
256 views

SFDX: Is there a documentation on list of file extns/mime types that sfdx cli renames the files for?

When we retrieve a static resource and convert into dx format, cli will rename the .resource to .png if mime type in the .resource-meta.xml is image/png. Is there a list of such mime types that cli ...
metasync's user avatar
  • 1,762
0 votes
1 answer
764 views

Using Aura attribute variable in static resource

I have some aura attributes on my Aura component <aura:attribute name="appName" default="servicePortalVar" type="String"/> I would like to use this variable "...
SEuser's user avatar
  • 1,835
0 votes
1 answer
507 views

static resource is not visible

I have a field named Statut__c , it is a picklist ( Active / Inactive ) , i want to get a static ressource named Inactif if the value is Inactive and Actif is the value is Active . i DID get any ...
mary snh's user avatar
0 votes
0 answers
131 views

Replacing Static Resource (java script) variables run time

I understand that the static resources (java script) are supposed to be static and loaded only once at run time. However, I have a requirement to dynamically change the content of a script depending ...
SEuser's user avatar
  • 1,835
0 votes
2 answers
4k views

Download a CSV file from a lightning component using a button

I'm trying to add a button Download CSV Template where I'll connect the button with a static resource. So, when you click the button, the files downloads, user can open the file, fill and reupload to ...
Kiran.pandiyan's user avatar
2 votes
0 answers
257 views

Google Captcha Static Resource to VisualForce Page

I am using google Re captcha in my Visual force Page as below The below one is working as expected. VF Page: <apex:page sidebar="false" showHeader="false" standardController=&...
SFDC_Beginner's user avatar
1 vote
3 answers
3k views

[ResizeObserver is not a constructor]

I am using Pixi.Js and graphology using static resource in lightning aura component. While generation of graph using these libraries I am facing this exception ResizeObserver is not a constructor The ...
Saffi Ullah's user avatar
-2 votes
1 answer
334 views

How to use google-libphonenumber in LWC?

Requirement is I want to format phone number which is present on Contact record and based on User's locale I want to format the phone number in local as well as international format based on User's ...
SFDCDJ's user avatar
  • 1,814

1
2 3 4 5
9