20 votes
Accepted

Apex Framework / library for consuming REST services

The ffhttp library should do the trick: https://github.com/financialforcedev/ffhttp-core It includes error handling, redirections, building header fields, oauth, mime attachments and more. EDIT - ...
user avatar
  • 394
17 votes
Accepted

How to pass security review when using "Without sharing" by design?

I would strongly suggest reading this recent post by Dan Appleman. He outlines the various ways in which factors like sharing and CRUD/FLS play into security, and ends with the comment, which tells ...
user avatar
14 votes
Accepted

How to Upload a File to a specific Library Folder using Apex?

As I can see from Your code while creating a ContentDocumentLink you are not specifying a LinkedEntityId. Linked entity ID tells in which folder it exists. So Minimum code needed to store file in a ...
user avatar
9 votes
Accepted

Moment JS format returns function string in Lightning Spring 17

We are already working on this one - its a bit tricky to explain the cause but it has to do with one of the remaining changes required in Lightning to fully support the Content Security Policy ...
user avatar
  • 9,974
9 votes

Any Platform Event Library or Best Practices out there?

Is it smart to create events like CaseInserted__e for all the possible objects i need to track, or is is smarter to have a general SObjectInserted__e event? Generally, use one event for each unique ...
user avatar
  • 429k
8 votes
Accepted

Sync data between Salesforce & REST API in a resusable way

Sorry in advance for a long answer, but this topic is near and dear to my heart and I think I can provide some interesting context/perspective. I am the founder of Valence (https://valence.app), a ...
user avatar
  • 932
7 votes
Accepted

How to load and use external library?

Using webcomponents and Jquery together can get bit tricky . Here is how i approached this and got it working 1.Create a zip file that has latest jquery.min.js , pagination.js and pagination.css ...
user avatar
6 votes

PageReference to Libaries page clearing my search

Your URI is invalid according to RFC 3986: the fragment part (the "#search") should come after the query part (the "?searchTerm..."). If you fix that, the PageReference will ...
user avatar
  • 129k
6 votes

How to pass security review when using "Without sharing" by design?

In order to pass the security review, every controller or controller extension must have 'with sharing'. There are no exceptions to this. However, if you need to perform some privileged action (and ...
user avatar
6 votes

How to pass security review when using "Without sharing" by design?

You cannot pass security review with classes marked as without sharing, the security scanner will always report these files as being a security violation. Without Sharing gets flagged by the security ...
user avatar
  • 6,089
6 votes
Accepted

ltng require scripts not working for me!

Your scripts from <ltng:require> are not guaranteed to be available in your component's init handler. They are loaded asynchronously. You need to add the attribute afterScriptsLoaded="{!c....
user avatar
  • 85.9k
6 votes

Design Patterns for Asynchronous Apex

That Dreamforce talk is hopelessly out of date - 2013! I haven't looked closely at the apex-async library, but it certainly uses at least some of the design patterns I cover in my Advanced Apex book. ...
user avatar
  • 3,384
5 votes
Accepted

Locker Service and Fullcalendar.io

Logan, I just happen to have a sample of Fullcalendar which displays events. But heads up .. it is not locker compatible. even though I have used ( Full Calendar: 3.1.0 & jQuery 2.2.4 ) as ...
user avatar
  • 1,969
5 votes

Any Platform Event Library or Best Practices out there?

This post contains multiple questions and is probably too broad but let me try to answer anyway. Overall I would say that using Platform Events (PEs) instead of triggers is not a good approach if you ...
user avatar
  • 3,735
5 votes

How to best enforce CRUD/FLS and pass Security Review

The best option today I think is to largely avoid CRUD & FLS and enforce security via custom permissions aligned with your business processes but that is not really answering your question. Part ...
user avatar
5 votes
Accepted

How to best enforce CRUD/FLS and pass Security Review

The answer was given by Chris Peterson (PM of Apex) and MVP Daniel Ballinger during Dreamforce '19 in the session "Reducing the Cost of Enforcing CRUD and FLS in the ESAPI". And the answer is: By ...
user avatar
5 votes

jsPDF Importing but not working in LWC

Because of the locker service, JSPdf is not supported in LWC. Check my answer to generate pdf in LWC using standard browser API.
user avatar
  • 3,219
4 votes
Accepted

Is there any easier way to add multiple users to a library?

Here is one approach Create a public group(s) that is subscribed to the library Use Dataloader to assign the users to the public group(s) by inserting into SObject GroupMember
user avatar
  • 61.4k
4 votes

Is there something like NPM for Apex/Salesforce already in use?

I've been building an installer for the Salesforce.com Foundation's upcoming release of NPSP 3.0 which can effectively handle installation/upgrade of dependent managed packages as well as bundles of ...
user avatar
  • 2,020
4 votes

Is there a defacto 3rd party utilities library for Apex such as Apache Commons is for Java?

awesome-salesforce is a curated list of Salesforce resources: What is Awesome Salesforce Awesome is awesome project started by Sindre Sorhus who is most popular person on Github. He created a project ...
user avatar
  • 6,127
4 votes

Salesforce Files Vs Salesforce CRM Content

Hope you have gone through these differences before posting the question. Refer Differences Between Files, Salesforce CRM Content, Salesforce Knowledge, Documents, and Attachments CRM Content needs ...
user avatar
4 votes
Accepted

Can not draw a circle with d3.js in lightning component

You can use lightning: container to accomplish this. Lightning:container was designed to use 3rd party libraries which are not locker service friendly in lightning components. HTML file: <html&...
user avatar
4 votes
Accepted

Libraries inclusion propagation to children components in Lightning

The documentation doesn't specify, as far as I can tell, but both of your statements are currently correct: a library loaded in a parent component is also available in the child component, and a ...
user avatar
  • 429k
4 votes

How to best enforce CRUD/FLS and pass Security Review

The most voted advice will get you failed at the security review. End-users rely on CRUD/FLS configurable from UI Setup, and they will get quite surprised that your app does not respect the standard ...
user avatar
  • 179
4 votes
Accepted

marketing cloud - can I use a third party javascript library inside email?

First off, you cannot run Client-Side Javascript inside of an email. This is because pretty much every ISP that sees this email will instantly flag it as a security risk and discard it. Potentially ...
user avatar
  • 27.8k
4 votes
Accepted

jsPDF Importing but not working in LWC

I know that almost a year has already passed, but I think that my method may be useful to someone. renderedCallback(){ Promise.all([ loadScript(this, jspdf+'/jspdf/jspdf.umd....
user avatar
  • 156
3 votes

Gantt chart for Salesforce

I had to find/implement a Gantt chart for my company a few months ago. The free ones that I was personally considering were: Google Charts' Gantt Chart (no idea about compatibility with Locker ...
user avatar
  • 46.3k
3 votes

Lightning Bundle fails to use external libraries after LockerService is Enabled

I'm not sure what version of lightGallery you're using in your provided source, but it appears to be outdated. If you upgrade to a newer version plus take a couple additional steps this repro should ...
user avatar
  • 3,813
3 votes
Accepted

Markdown in Apex?

I would recommend using an API to parse your markdown and return back html. One service I found that looks like it would work is from Github: https://developer.github.com/v3/markdown/.
user avatar
3 votes

Markdown in Apex?

No, there's not currently any markdown support in apex, although it's conceivably possible to write one with enough effort. As Daniel Hoechst suggested making a callout to an external markdown ...
user avatar
  • 22.1k

Only top scored, non community-wiki answers of a minimum length are eligible