Hot answers tagged

19 votes
Accepted

Can't access a global Apex class inside a managed package

You have to use the namespace to reference a component in a managed package. Just changing the code in the subscriber org should work. Here's the modified version you'd want to use (change packageNS ...
sfdcfox's user avatar
  • 481k
13 votes

How to host an Unmanaged package on salesforce appexchange

Although this post is from last year, I would like to address it since it's apparently coming up in search results for those looking to post unmanaged packages to the AppExchange, and the main answer ...
Anika's user avatar
  • 131
10 votes
Accepted

How to host an Unmanaged package on salesforce appexchange

Update Salesforce does not allow unmanaged packages to be part of appexchange .You will have to convert them to managed packages . You can publish your apps as managed package to the appexchange ...
Mohith Shrivastava's user avatar
10 votes
Accepted

View code in Managed package

Take a look at An Introduction to Packaging: Implications of Managed Packages on Source Code If someone installs a managed package, they don't get access to all the source code of that package. For ...
Adrian Larson's user avatar
  • 149k
10 votes

SFDX: how to delete a package

It cannot currently be done by you. Perhaps Salesforce support could do it if you contacted them. You can uninstall the package from various orgs as suggested by the previous answer. That does not ...
Tory Netherton's user avatar
9 votes
Accepted

Cannot add component to another package because it is an installed component

Generally, is it possible to install two unlocked packages that share overlapping Metadata, e.g. the same custom object? One would need to be a dependent of the other if the exact same metadata ...
sfdcfox's user avatar
  • 481k
8 votes

SFDX - Moving to unlocked packages

One viable alternative is start converting the profiles into permission sets as a part of the DX move . With permission set you can easily group them with relevant objects . Salesforce did a ...
Mohith Shrivastava's user avatar
8 votes
Accepted

Deployment error regarding translations when generating package version

There are two things you have to do: enable Translations in your Scratch-Org-Def (I guess, you already did). let package-version-create use this scratch org def (I guess, that you didn't) So you ...
Torsten's user avatar
  • 96
7 votes

I can't uninstall managed package

I believe there is a case where a package does not have an uninstall link which has nothing to do with dependencies. If the package is a subscription from the AppExchange, I believe you have to cancel ...
Beto Carvalho's user avatar
7 votes
Accepted

Use Object from another manage Package without making my own package dependent to it

I have never tried this before. But using dynamic objects you can do this. Here are idea to get you started. Store the package details and object, field in some custom setting or custom label. Now ...
Tushar Sharma's user avatar
7 votes
Accepted

Second Generation Packaging Confusion

Where do you actually create the package for the shared classes? I created it in a scratch org like the docs said. But what happens when the scratch org is deleted due to expiration Packages are ...
sfdcfox's user avatar
  • 481k
7 votes
Accepted

Permission set is deployed with unlocked package, but is missing permission. What could be the reason?

The link from @xedshot (https://help.salesforce.com/articleView?id=distribution_perm_sets_profile_settings.htm&type=5) is correct and relevant, but I feel that it's worth quoting and explaining ...
Aidan's user avatar
  • 13.5k
6 votes

Creating a Managed Package to Submit to the AppExchange

Here is the complete steps for app exchange publish So here are the steps. I numbered each step because the order is fairly important - in most cases, you cannot move forward without completing the ...
Tushar Sharma's user avatar
6 votes
Accepted

I can't uninstall managed package

There are certain situations where Salesforce will not allow you to uninstall a package because it could interfere with a part of the system that is not being deleted. I've list a few scenarios ...
Blair Kristin's user avatar
6 votes
Accepted

do we require to prepare Test classes for creating managed package?

When creating a managed package, prior to uploading you need to have test methods that meet the 75% coverage while in the packaging org. If they pass the managed package can be created So the answer ...
Eric's user avatar
  • 54k
6 votes
Accepted

Writing tests for Managed Package

Don't worry about coding defensively against your client's configuration; they're allowed to ignore certain types of test failures. This is noted in the documentation: If a subscriber creates a ...
sfdcfox's user avatar
  • 481k
6 votes
Accepted

Unlocked packages behaving like managed packages

This is a known issue and we have an item in our roadmap to fix this so that apex code in namespaced unlocked packages is visible in installed orgs. The side effect of this is that it is difficult to ...
Dileep's user avatar
  • 206
6 votes

Upgrading multiple packages at once

On our product roadmap, we have plans to support installing and upgrading multiple packages in a single transaction. Until that is available, would this multi-step process work for you? 1) Release ...
Dileep's user avatar
  • 206
6 votes

Who can modify a managed package?

The majority of packaged components can only be modified by the Package developer in the Packaging org. There are some exceptions, for example you can modify certain aspects of managed components in ...
Phil Hawthorn's user avatar
5 votes
Accepted

Creating a Managed Package to Submit to the AppExchange

when you submit your app to app exchange you need to be a salesforce ISV partner. you can signup for that program using following link Salesforce Partner signup once your signup approved from ...
Himanshu's user avatar
  • 10.5k
5 votes
Accepted

How do you include fields values in MDT packages?

You can deploy custom metadata records in changesets, but you have to add them to the changeset (which is different from just adding the type). In the "Component Type" dropdown, look for the name of ...
Mohith Shrivastava's user avatar
5 votes
Accepted

"This app can't be upgraded" in an unmanaged package

Unmanaged package cannot be upgraded .You will have to uninstall the existing app version and then reinstall . You can navigate to set up | packages | uninstall the app If you need ability to upgrade ...
Mohith Shrivastava's user avatar
5 votes
Accepted

Apex permission error while installing managed package in professional edition

As per the Salesforce documentation, You must be an eligible partner with salesforce.com and your app has to pass the security review. The appropriate permissions will automatically be enabled ...
Devendra's user avatar
  • 5,067
5 votes

Call a static method in managed package dynamically

The only way to call dynamic methods is to use instance logic. So you'll need an interface layer here: public interface StaticMethod { void execute(); } Then your implementations would look ...
Adrian Larson's user avatar
  • 149k
5 votes

PostInstallScript with second generation package

You can define the postInstallScript and UninstallScript within the file sfdx-project.json or when you use sfdx force:package:version:create Source: https://developer.salesforce.com/docs/atlas.en-us....
jeromegv's user avatar
  • 183
5 votes
Accepted

SFDX: how to delete a package

These are the all available package command which we have right now. package Commands. As of now, we don't have any command which can do this task so you need to manually delete the package from UI. ...
Tushar Sharma's user avatar
5 votes
Accepted

How to update a package in test environment after I changed it in development environment?

Presuming the installed version was already a Release version, simply upload the new version as a new Release version, and install it in the test environment. The changes will be applied as an upgrade....
sfdcfox's user avatar
  • 481k
5 votes

Does Unlocked Package support Person Account?

You should create your package version using your scratch org definition file. Here is the command: sfdx force:package:version:create -p <<PackageName>> -d <<PackagePath>> --...
Amer Nasser el dine's user avatar
5 votes
Accepted

Include two different package Directories during unlocked package creation

No, you're not missing anything. Each package may only be one directory. From your question, it appears you want two packages, with the force-app package depending on the common package. { "...
sfdcfox's user avatar
  • 481k
5 votes
Accepted

Apex compile failure on package installation

As at Spring '21, 2GP managed packages do not support component deletion, as covered in the 1GP vs 2GP gap documentation. A rename is equivalent to delete (old name) and add (new name). Salesforce ...
Phil W's user avatar
  • 34.1k

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