Hot answers tagged

19 votes

Get the list of users licensed for a Managed Package

As of Summer 14, there are 2 new objects which allow you to use SOQL to see which users are licensed for particular Managed Packages: PackageLicense and UserPackageLicense. UserPackageLicense lets ...
user avatar
  • 9,353
18 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 ...
user avatar
  • 433k
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 ...
user avatar
  • 131
10 votes
Accepted

Configuration Page for Package

Go to Setup > Customize > Home > Custom Links Create a new custom link to your VF page (eg /apex/ns__pageName) Edit your package and specify the custom link Now a [Configure] button will ...
user avatar
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 ...
user avatar
9 votes

Generate Salesforce package.xml programmatically

There are already some open sourced tools for this task .One of them is as below https://packagebuilder.herokuapp.com/ You can also use eclipse to the do this .In eclipse once you selected ...
user avatar
9 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 ...
user avatar
8 votes
Accepted

Why, when creating an app, do name examples include HRforce and Bugforce when the Salesforce Brand guidelines forbid to use names with 'Force' in it?

A custom app in Salesforce is not the same thing as an AppExchange app. A custom app is: An “app” is a group of tabs that works as a unit to provide application functionality. Salesforce provides ...
user avatar
  • 19.5k
8 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 ...
user avatar
  • 143k
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 ...
user avatar
8 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 ...
user avatar
  • 433k
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 ...
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 ...
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 ...
user avatar
  • 433k
7 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 ...
user avatar
  • 86
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 ...
user avatar
  • 12.8k
6 votes
Accepted

Generate Salesforce package.xml programmatically

Here is what you need to do: You need the ability to fetch the metadata details from the org. If you want to do this in Apex, you might want to check out the Apex Wrapper Salesforce Metadata API. ...
user avatar
  • 1,732
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 ...
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 ...
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 ...
user avatar
  • 53.1k
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 ...
user avatar
  • 433k
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 ...
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 ...
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 ...
user avatar
5 votes
Accepted

Impact of adding namespace on existing code

Typically you don't have to revisit all of your code. Most things will continue to run after the prefix is added. But most doesn't mean all. I found these points requiring modifications: Objects ...
user avatar
  • 33.6k
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 ...
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 ...
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 ...
user avatar
  • 4,907
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 ...
user avatar
  • 143k
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....
user avatar
  • 181

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