30
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 ...
- 5,584
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 ...
- 9,787
19
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-...
- 4,229
16
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 ...
- 5,584
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 ...
- 90.1k
16
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 (...
- 5,584
13
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 ...
- 14.3k
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
...
- 13.2k
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 ...
- 461k
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 ...
- 88.9k
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 ...
- 32.3k
11
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 ...
- 88.9k
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 ...
- 13.2k
10
votes
Accepted
Do 2GP Managed Packages send email notifications on unhandled Apex errors?
Yes, unhandled exception emails do work with 2GP.
I confirmed this by creating a managed 2GP with a Visualforce Controller that tries to divide by zero if a certain custom metadata record is set to ...
- 5,584
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 ...
- 36.4k
9
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 ...
- 4,029
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. ...
- 116
9
votes
Call Salesforce API from Apex and not fail Security Review
The OAuth flow we used for our AppExchange app is Web Server Flow for Web App Integration. There are various types of flows that can be used as per your requirements; we used Web Server Flow for Web ...
- 1,231
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 ...
- 3,166
8
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 ...
- 4,229
8
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 ...
- 88.9k
8
votes
Can we prove security using Apex Tests & System.runAs()?
I must admit, we have not attempted to revisit this side of things - our core managed package is too large and too mature.
What I do know, from the few uses of System.runAs we have, is that this is ...
- 31.2k
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 ...
- 461k
7
votes
"ERROR: entity type cannot be inserted: Second Generation Package." when trying to create Second Generation Package
When you enable the org-wide setting in the Dev Hub menu, the only user profile that will have the permission enabled is the default Sys Admin profile. If you use another profile in production, you ...
- 171
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 ...
- 13.2k
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 ...
- 12.9k
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.
...
- 36.4k
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 ...
7
votes
Packaging Connected App in 2gp package - CLI says package is deleted?
You don't actually need to package the Connected App, especially when all/many of your clients use the same connected app with the same secret/ID and same mobile app (for example). The important thing ...
- 31.2k
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 ...
- 86
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
isv × 362managed-package × 205
apex × 49
appexchange × 49
security-review × 27
partner × 20
salesforcedx × 18
licenses × 17
package × 16
connected-apps × 15
lma × 15
2gp × 12
managed-extension × 12
visualforce × 11
lightning-aura-components × 11
lightning-web-components × 11
visual-workflow × 9
oauth2 × 9
trigger × 8
rest-api × 8
metadata-api × 8
governorlimits × 8
permission-sets × 8
unlocked-package × 8
administration × 7