Hot answers tagged

28 votes
Accepted

Extension packages & Licence Management in 2GP

Thanks for the question! I've created an answer in three parts, each one meant to address a specific question you've asked. PART ONE: How to Create Second-Generation Extension Packages PART TWO: How ...
user avatar
19 votes
Accepted

Custom Metadata vs. Custom Objects in Managed Package

Here are some "advantages" vs using a Custom Object: Can be Deployed Can use Field Definition or Entity Particle to create references to Custom Object Metadata Retrieve doesn't cost against ...
user avatar
  • 9,597
18 votes

Modularize (existing) LWC for reuse and flexible distribution

This is a complex topic and I’m going to do my best to give some quick pointers but we could fill an entire white paper on this theme and I’m sure that are some things that I might overlook. Inter-...
user avatar
  • 4,026
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
16 votes

Custom Metadata vs. Custom Objects in Managed Package

A reason I haven't seen articulated yet applies specifically to the managed package context: Packaged, protected Custom Metadata Types are an ideal solution for secret storage in a managed package ...
user avatar
  • 87.3k
15 votes
Accepted

Best practices for breaking 1 GP monoliths into 2GP modules

This is a great topic. Many Salesforce Partners are exploring ways they can leverage 2GP today, even as they wait for 1GP=>2GP migration which is currently available only as a developer preview (...
user avatar
14 votes
Accepted

Does SOQL SUM(CurrencyField__c) calculate correctly in MultiCurrency Org and how?

Source: http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_soql_querying_currency_fields.htm 1) Sum() calculates different currencies correctly. 2) The result of Sum() ...
user avatar
14 votes
Accepted

Should DX Unlocked packages be used for app distribution to customers

TLDR: No, Unlocked Packages cannot be used like this. Anyone commercially distributing a Salesforce app must do so using Managed Packages. Also, Managed Packages offer many valuable features simply ...
user avatar
12 votes
Accepted

Friction-free process to switch to SalesforceDX with existing managed package

Summary The next generation of packaging is still very much a work in progress. The core focus is embracing the source control driven approach of DX into how we develop and distribute packages. The ...
user avatar
11 votes
Accepted

Version Control tightly integrated into the Platform - is this coming?

This feature is going to go into pilot in Winter or Spring '15. Note this idea being "Under Consideration" https://success.salesforce.com/ideaView?id=08730000000BrBKAA0.
user avatar
  • 6,109
11 votes
Accepted

Get currently installed package version from Apex Class

You can use System.requestVersion, which returns the version of your package. See Version for more details, but I'll also include the snippet from there here: if (System.requestVersion() == new ...
user avatar
  • 438k
11 votes

How do I publish apps on AppExchange for free as a freelancer?

You should be able to sign up for a partner community using your dev org login credentials where you have built the package . https://partnersignup.salesforce.com/partnerLogin You will get access to ...
user avatar
11 votes
Accepted

Who has taken "my" Managed package namespace? Can we find out?

There is the possibility of installing the package using Metadata API. Then inspect the company details, package version description or documentation (etc) for meaningful contact information. For ...
user avatar
11 votes
Accepted

How to make a LWC component that's usable on all object record pages?

In this case, targetConfigs is an optional tag. it is upon you, weather you want to restrict the component to be used on some particular object record page. If you don't want, simply remove the below ...
user avatar
11 votes

Handle chain of long-running callouts from Salesforce

Roughly speaking, this is what Queueables are for. Once Transaction Finalizers are GA, I think they'll be a pretty good solution for this. There are many concerns, though: The Queues If you're ...
user avatar
  • 12.9k
10 votes
Accepted

How to OWASP ZAP scan external REST API using OAuth2

For Finding vulnerabilities in the API only application(does not have a web app and you have access to only its REST API), you can configure proxies in the Postman and execute OAuth and other REST api ...
user avatar
9 votes
Accepted

Unable to push-upgrade managed app after deleting packaged VF page

We just got this answer from Salesforce.com Support regarding our related case. There is this knowledge article for this kind of problem Removing Obsolete Visualforce from Managed Packages Eric ...
user avatar
9 votes
Accepted

Not being able to reference packaged custom LWCs from other LWCs outside the package

Cross namespace import and communication is currently restricted because of a security limitation in LWC. With our current Lightning Locker architecture there just isn’t a secure way to enable it. ...
user avatar
8 votes

Security Scanner finds XSS False Positives / JSENCODE incompatible with Boolean fields?

You do not need to rewrite the code to eliminate scanner false positives -- there will always be false positives. However, if you want to rewrite the code, then you can replace a boolean with a text ...
user avatar
8 votes
Accepted

Upload unmanaged package on AppExchange, without being Salesforce ISV Partner?

You can join the partner program as an individual ISV partner and list free apps on the app exchange (managed or unmanaged) at no cost (I've done so!). However, you'll need to be fairly persistent ...
user avatar
7 votes

Upload unmanaged package on AppExchange, without being Salesforce ISV Partner?

You can upload and distribute unmanaged (and even managed) packages, but you won't be able to list it "publicly." Users can still install it if they can get a link to it, for example, from your ...
user avatar
  • 438k
7 votes
Accepted

When to set Lightning access=GLOBAL in Managed Packages

Let's consider the following base scenario to answer your questions: you plan to use a contrib:parentComp component. contrib:parentComp has a child component contrib:childComp. contrib:childComp has ...
user avatar
  • 4,026
7 votes
Accepted

Platform Cache for ISVs

Probably a good question for Partner Success. But I know myself and other ISVs I talked to were put off by the cost - it was pretty expensive to buy cache dedicated to my namespace since it was a per ...
user avatar
7 votes
Accepted

How to test CRUD and FLS in unit tests?

There are a few different ways to attack this problem, but the most common is to create a user with permissions, and then use System.runAs to execute your tests. I normally grant permissions to my ...
user avatar
7 votes
Accepted

Unable to access Apex in namespaced scratch org

Something was wrong with my scratch org. After I recreate it 2 times it worked without adding any namespaces. I didn't delete my question as this might happen others and then the thread is helpful. ...
user avatar
7 votes
Accepted

Manipulate (packaged) Flow using Apex

Salesforce has exposed tooling api that can help you clone the Managed Package flow if it is packaged as template. Note you can wrap this tooling api via an apex class and achieve everything that API ...
user avatar
7 votes

Why can't we package custom AuthProvider in Managed Package

Auth Provider is org specific. It has a callback URL where a connected app redirects after authentication and org get authcode and complete the rest authentication steps. If salesforce allows Auth ...
user avatar
7 votes
Accepted

How different is Initial Security Review from Resubmission

I've gone through a resubmission last year. To be fair, the process was fairly straightforward (exactly the same as a normal submission) - but that's because I kept the resubmission in mind after my ...
user avatar
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,109

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