Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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
1 answer
39 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?
user avatar
0 votes
1 answer
22 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 &...
user avatar
  • 33
0 votes
1 answer
32 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 ...
user avatar
  • 35
-1 votes
1 answer
35 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 ...
user avatar
0 votes
0 answers
16 views

how to add separate static resource image in angular UI using site?

we using Angular ui using site except in asset folder i am uploaded a separate static resource gif how to call static resource in html <img class="feature-image" [src]="getSFResource(...
user avatar
2 votes
1 answer
82 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 ...
user avatar
2 votes
1 answer
139 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--...
user avatar
4 votes
1 answer
72 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 ...
user avatar
  • 1,550
0 votes
0 answers
25 views

CSS within Static Resource

I read on other post that when using css within static resource you cannot use classes? I have per example .columnHeader { float: left; width: 50%; padding: 10px; text-...
user avatar
  • 73
0 votes
1 answer
59 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 "...
user avatar
  • 1,748
0 votes
1 answer
62 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 ...
user avatar
0 votes
0 answers
44 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 ...
user avatar
  • 1,748
0 votes
2 answers
455 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 ...
user avatar
2 votes
0 answers
56 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=&...
user avatar
0 votes
1 answer
360 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 ...
user avatar
-1 votes
1 answer
102 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 ...
user avatar
0 votes
0 answers
17 views

How can I change the icon color in the rows of the lightning table?

I want to change the color of the iconName of the row in my table, can someone help me? If not, I would like to use a static resource on the text side of my lightning table cell Has anyone experienced ...
user avatar
0 votes
2 answers
232 views

Custom lightning-icon won't render properly

I'm trying to add a custom lightning-icon to my experience cloud lwc module, but I can't make it render properly. The custom icon is basically a blue background color with a white dash on the middle. ...
user avatar
0 votes
1 answer
126 views

How to pass an updated parameter to a static resource (React App)?

I am currently using LCC npm module (Lightning Container) to make Apex calls in our React app. However, we are also exploring cutting out LCC altogether (the concern is that it has not been updated in ...
user avatar
  • 1
0 votes
1 answer
223 views

How to Import lodash into org?

I'm new to lwc and I'm trying to import an external library - lodash. I tried some ways and none of them worked for me. I'm probably doing something wrong I didn't find any good tutorial that shows ...
user avatar
0 votes
1 answer
213 views

Channel Menu Settings File Not Working

I am trying to set up a channel menu to group our communication channels together for customers. However, our embedded service chat has quite a few customizations I need to carry over, and I am ...
user avatar
2 votes
1 answer
64 views

Aura Component is referring wrong Static Resource (js method)

I have posted the sample snippet of the problem which I am facing currently. Description I have created two aura components. Each aura component refers different static resources. Both static ...
user avatar
  • 23
0 votes
1 answer
33 views

Static resource get files from zip

I want to give files from zip in static resource. How can i do it? It gives me 404 on getContent() anyway: with file ending(png,txt, etc) and without. PageReference pageRef = PageReference....
user avatar
  • 41
1 vote
0 answers
263 views

DataTables taking a long time to load/timing out

Is there anything about the following Datatables code that would cause a timeout or cause issues with the construction of a datatable? First, I have jquery, bootstrap, jqueryui, datables, and moment....
user avatar
0 votes
1 answer
50 views

Can I get the static resources components name in apex?

I have one requirement where I want the components present in the static resources. I have uploaded the zip files having three images. Now I want to get the names of that three images in apex however, ...
user avatar
0 votes
1 answer
40 views

Lightning Web Components, How to include a static resource in an unlocked package?

We are wanting to add a static resource file to an unlocked package for a learning project. It is a JS file that we would like to add to the static resources. Can we include that with a package ...
user avatar
0 votes
0 answers
37 views

Test.loadData is not inserting data for Producer object

I am working on a Data Factory test class and I was able to successfully load relational data for Account, Case, WorkOrder, User, InsurancePolicy and couple of other custom objects by providing Id in ...
user avatar
  • 379
1 vote
1 answer
90 views

Create subfolder under staticresources

In a Lightning Experience project, I inside force-app/main/default/ there is a staticresources folder. I have both CSS and JS files in there and I'm using them in LWCs using lightning/...
user avatar
  • 461
0 votes
0 answers
53 views

Query in Batch Apex returns "List has no rows for assignment to SObject" [duplicate]

I have test class where I am using a csv file to insert 200 records Account data. First 100 are like: remaining 100 are like: I am using above created test class to test a batch apex class which has ...
user avatar
  • 379
2 votes
1 answer
162 views

Import Luxon into LWC

I am trying to use Luxon in a LWC. I believe I am messing up the syntax of the decomposition of DateTime from the library. Following the documentation: https://developer.salesforce.com/docs/component-...
user avatar
  • 1,818
0 votes
2 answers
120 views

How to import variables into static resouce .js files?

Example There are 3 .js scripts / files as a static resource. First.js Second.js CommonVars.js I am doing something like this in CommonVars.js CommonVars.js var myCommonVars = { NAME : 'STACK', ...
user avatar
1 vote
1 answer
104 views

Does loadScript from Platform Resource Loader cache results?

I'm exploring writing a LWC mixin that loads a script as part of its use using loadScript from the Platform Resource Loader. The script I want to load is the Apollo GraphQL client Javascript code, and ...
user avatar
  • 1,151
0 votes
0 answers
19 views

Google Recaptcha V3 ACTIONS Implementation in Lightning Web Component [duplicate]

What does it take to register Actions from Recaptcha V3 in Google Admin Panel? Google Admin Panel is not displaying analysis of Actions such as Top 10 Actions. Below is my static resource HTML. The ...
user avatar
  • 35
0 votes
1 answer
89 views

How to ensure that static resources created by me in my sandbox are pulled to my local IDE (IntelliJ)

I tried to pull the static resources using Illuminated cloud as well as through sfdx commands, but can not see the static resources created by me in the static resources folder (in the local IDE)
user avatar
0 votes
1 answer
491 views

Map returned to JS does not include null values

I use a managed package that gives me the ability to invoke Apex class, get result and handle it. My Static Resource (JS code) invokes Apex to fetch one or more records from the DB and return them ...
user avatar
0 votes
0 answers
108 views

How to read / write static resources with multiple files from Apex?

I can currently create a StaticResource which represents a single JSON file in an Apex context by using the MetadataService class from the apex-mdapi library. Likewise, I can use a SOQL query to ...
user avatar
  • 309
0 votes
0 answers
17 views

How to create a link from static resource using aura component? [duplicate]

I want to create a link and download an excel file that is stored in static resource.How do i do that?
user avatar
0 votes
1 answer
111 views

LWC is not loading after chaning the previous labels in static resource

i have the static resource in the salesforce it has few files related to the d3.jsi changed the label names in the d3v4,js file after that i saved the modified d3v4.js file in the static resource,I ...
user avatar
-1 votes
1 answer
437 views

Generate Barcode Using JsBarcode library in lightning [closed]

Did anyone have used JsBarcode library in LWC in order to generate code 39 barcode, if yes can you please share a sample how I can use the library and generate the barcode. Till now the steps I have ...
user avatar
0 votes
1 answer
91 views

Create component used to include other components or static resources

In a custom lightning aura component app, I have a component where I want to include a static resource. I have successfully created the static resource (a JavaScript file) and included it in the ...
user avatar
  • 461
0 votes
1 answer
45 views

Can I upload Java class as a Jar file in Static Resource and use that Java class components in Apex class?

I have piece of code in Java language, I need to use it in apex class. Let me know if I can upload Java class as Static Resource and use it in Apex class?
user avatar
0 votes
0 answers
71 views

How can i add an image to an existing zip folder of static resource using apex class

How can i add an image to an existing zip folder of static resource using apex class. Basically, the requirement is that, whenever i upload an image using my custom image uploader component, the image ...
user avatar
1 vote
0 answers
155 views

getContent() throws ApexPagesGenericException 404

When trying to retrieve a json file from a zip file, I get the following error: Error: System.VisualforceException: core.apexpages.exceptions.ApexPagesGenericException: 404 status code return from ...
user avatar
  • 1,431
2 votes
1 answer
1k views

Need help with LWC and iframe

I appreciate you looking. Here's the problem I'm having: I have a project that includes pdfjs as a static resource. Part of this resource is an html file, viewer.html, that is the actual pdf viewer....
user avatar
1 vote
1 answer
2k views

Scoped imports are not allowed when runtime namespace is specified

I'm trying to load a static resource file in lightning web component which is running under vlocity_ins runtime. I'm getting the error Scoped imports are not allowed when runtime namespace is ...
user avatar
0 votes
1 answer
67 views

Is It More Inefficient To Serve A Zip File From Static Resouces vs Individual File?

If I have a zip file of javascript files and I have uploaded into static resources. I reference a particular file inside my zip file in my VF page as follows: <script src="{!URLFOR($Resource....
user avatar
  • 23
0 votes
1 answer
319 views

Unable to display static text from static resource in LWC

I am trying to retreive the text in LWC from a text file which I uploaded on static resource. import textfromStatic from '@salesforce/resourceUrl/Level_1'; textfromStatic = textfromStatic; ...
user avatar
0 votes
1 answer
541 views

How to access browser's "window" object in Aura component

I have third party JS file that I have imported in Salesforce as Static Resource Structure of static resource: myuploadzip.zip ----myuploadzip.JS I have imported the same in Aura Application as below:...
user avatar
1 vote
1 answer
146 views

System.SObjectException: ORA-20001 when deploying Changeset for users

I'm deploying an apex class and Test class which is running successfully and covering 84% test coverage in sandbox however when deploying it in Prod, I'm running in to below issue. I have included ...
user avatar
  • 55
5 votes
1 answer
111 views

Will salesforce continue to support bringing in third party js inside lwc or not?

We have some lwc components in our app, that took advantage of bringing in third party code (in our case, jQuery, angularJs etc. We did that to bring in some legacy code inside lwc. The code was ...
user avatar
  • 103

1
2 3 4 5
9