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
2
votes
1answer
30 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 ...
0
votes
1answer
24 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....
1
vote
0answers
32 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....
0
votes
1answer
19 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, ...
-5
votes
1answer
36 views

Use a static resource (zip file with 2 images) to display first image on a Visualforce Page [closed]

I need to Upload the specified zip file as a static resource and display an image from the file on a Visualforce page. I've created it as a static resource called "vfimagetest". Requirements ...
0
votes
0answers
11 views

Table breaking when passing a page in pdf [duplicate]

well I have a table in a vfp that will be generated later as pdf, and the number of rows in this table is dynamic, the problem is that when you go from a page to a table that "breaks" ugly, ...
0
votes
1answer
22 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 ...
0
votes
0answers
21 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 ...
1
vote
1answer
32 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/...
0
votes
0answers
52 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 ...
2
votes
1answer
72 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-...
0
votes
2answers
30 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', ...
1
vote
1answer
35 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 ...
0
votes
0answers
17 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 ...
0
votes
1answer
27 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)
0
votes
1answer
157 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 ...
0
votes
0answers
35 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 ...
0
votes
0answers
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?
0
votes
1answer
37 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 ...
-1
votes
1answer
204 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 ...
0
votes
1answer
39 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 ...
0
votes
1answer
37 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?
0
votes
0answers
45 views

Read static resource file (img) in aura controller js

I have created an aura comp when it is displaying icon from static resource dynamically. In some cases the icon is not available so we need to display a default icon. Now I am displaying icon ...
0
votes
0answers
36 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 ...
0
votes
0answers
62 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 ...
1
vote
1answer
331 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....
0
votes
0answers
27 views

Address Auto Complete Not Working from Static Resource

I'm attempting to demo an "address type-ahead" API into a lightning component. For a standard HTML page with js/css, the integration should be as simple as including the js/css files and ...
0
votes
0answers
30 views

Unable to refer image from zipped static resource in a Salesfroce Formula field

I have researched about this and tried different ways suggested like in the below discussions: Formula Field - Image from zipped static resource Static resource image in formula field but I failed in ...
1
vote
1answer
604 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 ...
0
votes
0answers
48 views

Enable Secure Static Resources for Lightning Components- Release Update

I have a task to complete my analysis and testing of this release update, Currently I am in confusion with the description, Can anyone explain what changes will be occurred after enabling this release ...
0
votes
1answer
31 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....
0
votes
1answer
73 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; ...
0
votes
1answer
269 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:...
1
vote
1answer
82 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 ...
0
votes
0answers
42 views

migrating rtaImage of knowledge article in Salesforce

I am migrating knowledge article data from one salesforce environment to another using Informatica. so far we are able to locate the payload that we are planning to migrate. We use content payload ...
5
votes
1answer
86 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 ...
0
votes
0answers
59 views

How Can I Reference A Font File In CSS For My Visualforce Page through Static Resources?

I have a .css file that I have zipped along with image assets and font assets. On the front end through my Visualforce page I am bringing this css file in as an <apex: stylesheet> Here's what I ...
0
votes
0answers
28 views

Issue integrating Recurly with Salesforce using Aura/Lightning Framewrok

I'm building a payment screen using Lightning Components. For this I need to use the Recurly.JS Framework to invoke a few functions that will allow the org to integrate Salesforce with Recurly. I have ...
0
votes
1answer
97 views

Get the eng version of toLabel field value from SOQL

I have a field in soql which I have marked as tolabel(), the reason is to get the field value translated for the login user. But the same field value name is used in static resource to display the img....
1
vote
1answer
67 views

List of Salesforce objects those are File types like Document, StaticResource, Contents etc [closed]

I would like to know the list of Salesforce objects whose are based of FILE type. For example Document, Attachments, ContentVersions, Static Resources etc I would like to see what more objects comes ...
0
votes
1answer
101 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
45 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
50 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
94 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
479 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
224 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
142 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
193 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
35 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
48 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 ...

1
2 3 4 5
8