Questions tagged [libraries]
The libraries tag has no usage guidance.
91
questions
0
votes
1
answer
77
views
System admin unable to see all ContentWorkspace
Let's say you have two users, each with System Administrator profile
Sysad1
Sysad2
Each user has Salesforce CRM user permission. The System Administrator profile includes
Manage Salesforce CRM ...
0
votes
1
answer
486
views
Not able to render HTML in PDF using jsPDF library in LwC
I am trying to build a simple custom pdf in LwC using jsPDF v2.5.1 library and loading this library using loadscript in rendered callback method, now I am trying render HTML content in PDF using doc....
3
votes
0
answers
232
views
LWC: Building JS dependencies from NPM modules
To take advantage of NPM's audit, update, and other capabilities, I'm a firm believer that developers should use a package manager like NPM to manage JavaScript libraries that they import in their ...
0
votes
0
answers
34
views
Documents access to limited group of users (related to Account)
I have a requirement
There are a group of users who can upload documents on Account (possibly public group)
However, the documents uploaded should only be accessible to that group of users and not ...
5
votes
1
answer
352
views
How to use Javascript libraries with Lightning Web Security in Aura components
We are using the Leaflet Javascript library to add mapping to our application. Currently we have the following:
<ltng:require styles="{!$Resource.Leaflet + '/leaflet.css'}"
...
2
votes
1
answer
163
views
How to load an external library and have it useable in Local Development
So I have loki loaded on it's static resource like a good boy and whenever I run the component in an actual org everything is hunky dory however testing in local dev always makes it return a 404 for ...
0
votes
0
answers
104
views
View Salesforce Files without downloading in NodeJS/ReactJS
I want to use salesforce files Library as a content source to store mp4, pdf, txt and docs files and render them on a ReactJS app.
I am using Salesforce REST APIs for most of the operations including ...
1
vote
1
answer
814
views
How to create pdf using pdfjs library in lwc
I have a lwc in which I try to render a pdf. I have zipped the pdfjs library and added this as a static resource. In my template I can call the library as following:
<iframe id="...
1
vote
0
answers
217
views
Issue importing dependent libraries in LWC
I'm trying to create an orgChart in LWC to represent how my objects are set up.
I found the following library to do it : https://github.com/bumbeishvili/org-chart
When looking at the examples, he ...
1
vote
1
answer
608
views
JQuery - "$ is not defined" Error only in Experience Builder
im trying to use jQuery library in my experience builder (LWR) site
i used code from this video: https://youtu.be/W5VLwlXtStM
and it works perfectly OK in salesforce (exactly as shown in video) but in ...
1
vote
1
answer
394
views
Dataloaded ContentWorkspace (libraries) with no permissions and they are now hidden from all users
I have a question about data loading ContentWorkspace (Library) records into an org. I used dataloader to load a number of library records. I set the ShouldAddCreatorMembership field to False so now ...
3
votes
1
answer
719
views
Third-party js lib not being displayed in canvas LWC (Fabric.js lib)
I'm trying to display some shapes using the Fabric.js library.
From the console, seems like the fabric.canvas is built correctly, but nothing is being rendered.
My code:
HTML
<template>
<...
0
votes
0
answers
28
views
Question from sales guy: library lookup within an Opportunity
Preface: I'm not a developer, but looking for help. My sales org uses Lightning version -- within the Opportunity, I would like the opportunity to lookup in our Library the Close Won / Close Lost ...
0
votes
0
answers
316
views
Use external javascript library only in specific child LWC instead of including in VF page
I am trying to use an external JS library for feedback purpose.
When I use the library in a VF page using <script> tag by including src="js URL", it works well and I can inspect and ...
6
votes
1
answer
415
views
Are there any utility libraries for LWC development?
Each time I develop LWCs I feel like I'm reinventing the wheel with wrapping apex requests in simpler functions or by providing custom error handling (with showing toasts etc.).
Maybe there are some ...
0
votes
1
answer
111
views
Files visibility while adding them to a library
I am currently trying to figure out one problem connected to Libraries and ContendDocuments.
So I currently have 2 libraries. One library is to store all of the files in the system, while another one ...
1
vote
1
answer
353
views
How to use external libraries in LWC with inner class (function)
I wanted to use this library https://anseki.github.io/leader-line/ in lwc, uploaded it as static resource
import { loadStyle, loadScript } from 'lightning/platformResourceLoader';
import LeaderLineJS ...
2
votes
2
answers
1k
views
Lightning Web Component: Importing JS library fails with empty error object
Another curious case of empty error messages. This time I am trying to import a JavaScript library, Moment.js, and am getting a failure but no indication of why.
import { loadScript } from "...
4
votes
1
answer
1k
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 ...
2
votes
1
answer
1k
views
Sync data between Salesforce & REST API in a resusable way
It feels like groundhog day. As a Salesforce Partner building AppExchange apps one application aspect keeps repeating and the custom solutions I build just don't satisfy my need for reuse.
It's about ...
2
votes
0
answers
151
views
How to pre-load and share a 3rd party JavaScript library across multiple LWCs?
This example of using D3 combines the loadScript in the connectedCallback with the code that uses D3, initializeD3 here:
renderedCallback() {
...
Promise.all([
loadScript(this, D3 + '/...
3
votes
2
answers
4k
views
jsPDF Importing but not working in LWC
I tried to use jsPDF in LWC.
I uploaded jsPDF.min.js and html2cavas.min.js as static resources.
Then I load them in my component :
import jspdf from '@salesforce/resourceUrl/jspdf';
import ...
1
vote
0
answers
40
views
How to test where an imported static asset library fails on import
I have been trying to upload various bundled libraries to static resources to import them into a LWC component. I have been successful in doing this when using api version 39, but this fails on ...
-1
votes
1
answer
1k
views
marketing cloud - can I use a third party javascript library inside email?
I need to use a third party javascript library inside email that is triggered after clicking on a button inside the email.
I need to convert my email to pdf and allow a user to download the pdf ...
2
votes
1
answer
330
views
In Apex, how do I know if my user can contribute content to a particular library?
Is there a way to discover if the current user can publish content to a specific Library using either Apex or Javascript?
Use Case
I have a shared library (DeveloperName = Shared_Forms) that many ...
5
votes
1
answer
4k
views
I can't load PDF.js lib in Lightning Web Component
I'm creating an lwc component that shows a pdf with canvas, the lib I'm using is this:PDF,js
when trying to load lib, returns me an undefined error, can someone help me how to load correctly
My Html ...
0
votes
1
answer
152
views
How to query attached fiels from library in Lightning style?
I have the following query:
List<Document> attachments = [Select Id, Name, Type, Folder.Name, FolderId From Document WHERE Folder.Name = 'Team Attachments'];
In Lightning I have the same ...
14
votes
4
answers
3k
views
How to best enforce CRUD/FLS and pass Security Review
Since Salesforce began to require CRUD / FLS checks as part of the Security Review for AppEchange apps in 2015 there has been a lot of discussions why this cannot be done by the platform and how this ...
0
votes
0
answers
87
views
Libraries Component on Community Page is auto focused
I have a community page which contains a library community component, added from the community builder.
This component, when loaded, displays a folder. On page load, this folder is auto focused, ...
3
votes
2
answers
6k
views
How to load and use external library?
I don't know how to use the library of Pagination in a lightning web component but I can't use the example method:
$('#demo').pagination({
dataSource: [1, 2, 3, 4, 5, 6, 7, ... , 195],
...
2
votes
1
answer
429
views
Files and Libraries As Lightning Component
I want to include a Visualforce component on a Lightning Record Page that routes to a specific file library. As neither Files nor Libraries are Objects, I am having some trouble developing this ...
2
votes
2
answers
3k
views
Move a ContentDocument from one library to another in Apex
Is there a direct way to do this in Apex?
I tried doing DML to ContentDocumentLink or ContentWorkspaceDoc. But nothing works.
What I tried so far
Update the Library in ContentWorkspaceDoc
...
24
votes
2
answers
4k
views
Apex Framework / library for consuming REST services
To consume REST services there is a lot of boilerplate code needed:
Build Apex Objects to model the responses
Code to deserialize REST responses to those classes
Handling of HTTP requests, responses ...
0
votes
2
answers
1k
views
Locker Service and 3rd party library, how to pass Security review?
Is it a way to use 3rd party library/framework like Vue/Angular and bypass security review by Salesforce. Because only option to use those kind of library seems possible with version 39.0 which is ...
0
votes
2
answers
236
views
Share a File Between Communities
I have files that were uploaded to the Asset Library for a Community by adding them to the Rich Content component on a Community page. When I look at the File's sharing settings, I can see that it is ...
0
votes
1
answer
322
views
Changed File Asset & getting old version sometimes & new versions sometimes - cache has been cleared
I changed the image for a file asset. I am sometimes getting the old image and sometimes getting the new image when I use the same URL. It is as if Salesforce servers are out of sync. Does anyone ...
0
votes
2
answers
4k
views
Community Guest can see files in Asset Library
My Community Guest can see files in the Asset Library. How can I change this?
-1
votes
2
answers
1k
views
Design Patterns for Asynchronous Apex
Background
After listening to Dan Appleman's talk:
Dreamforce 13: Design Patterns for Asynchronous Apex
I went to look at the code:
Sample Code: Design Patterns for Asynchronous Apex
...
10
votes
1
answer
10k
views
How to Upload a File to a specific Library Folder using Apex?
I am trying to save a Visualforce page as a PDF file to a Library folder in our Salesforce org. I have been unable to figure out how to save this new PDF file to a specific Library folder.
I tried ...
0
votes
1
answer
89
views
visualforce list of available javascript libraries? [closed]
This is me frustrated with getting wrong search results...
I'm looking for any salesforce based javascript files or libraries available for use in visualforce pages.
I've come across a few in the ...
0
votes
1
answer
1k
views
How do I build a related list against a Files Library (in Lightning)
I want in the related tab of a record to have a Library related list shows all the files in a library? Is that possible?
2
votes
1
answer
6k
views
ltng require scripts not working for me!
I'm having trouble accessing my static resource (a js lib) in my controller.js in my lightning component.
My goal is to bundle up all my javascript functions and classes and use across most ...
0
votes
0
answers
361
views
Error in external library DataTables
I need to export my datatable to pdf, for that I'm using DataTables libraries.
It seems to be running fine here:
However while using the pdfmake.min.js file in lightning component, I'm getting below ...
1
vote
1
answer
660
views
jsPDF library does not work in Lightning components 43.0 version
I have stored jsPDF library in static resource and using it in lightning component where version is 43.0. This library does not work if LockerService is enabled.I decreased version to 39.0 and then it ...
1
vote
0
answers
134
views
Using jsPlumb library in lightning component
I'm trying to get jsPlumb to work inside a lightning component and I'm stuck in the beginning (https://jsplumbtoolkit.com/community/doc/home.html#container). When I try to initialize container, i get ...
2
votes
0
answers
516
views
Lightning Component CSP - Meta tag http-equiv for TinyMCE
I have a lightning sub component within a larger component that uses TinyMCE js library locally to provide advanced editing capabilities. The component works when I disable LockerService, by setting ...
6
votes
1
answer
99
views
Libraries inclusion propagation to children components in Lightning
If I have a parent lightning component and the component has ltng:require do I need to require the same libraries from the children components or will the inclusion be propagated to children?
For ...
1
vote
1
answer
159
views
Incorporate Less in the lightning project
Is it possible to incorporate Less in the lightning project?
If possible, provide me with any manual on the topic you know about, please.
Here is what I tried out:
Uploaded the library file as a ...
2
votes
1
answer
1k
views
Can not draw a circle with d3.js in lightning component
Why can not I draw a circle with d3.js in a lightning component?
appl.app:
<aura:application >
<c:libComp/>
</aura:application>
comp.cmp:
<aura:component>
<ltng:...
14
votes
5
answers
3k
views
Any Platform Event Library or Best Practices out there?
I'm coming to a point where my software does to many things at the same time, so I decided to switch to Platform Events to decouple everything. I don't handle external events, I'm only planning to use ...