Questions tagged [managed-package]
A managed package is a fully-upgradeable container used to distribute everything from an individual component to a set of related apps.
2,148
questions
73
votes
1
answer
6k
views
InstallHandler runs under a special ghost user. What rights does it have?
When you install a managed package with a post-install script, Salesforce creates a special ghost user under which all of the post install activities occur. I think this is undocumented. Here are some ...
37
votes
6
answers
11k
views
Documenting Salesforce.com Apex class files
[I asked this question on Stack Overflow but didn't get any answers there.]
Since the Salesforce.com Apex language is "Java-like", I'd like to use javadoc or Doxygen to generate API documentation for ...
35
votes
4
answers
7k
views
Namespace Prefix in JavaScript and Apex within Installed Package
When you have a dedicated Visualforce Page and can use modern JavaScript Remoting techniques, this is seldom an issue. But I'm looking at some historical code in a managed package like this:
{!...
34
votes
1
answer
933
views
Best practices for designing and maintaining Global classes?
We've always been conservative when it comes to exposing Globals for use by extension packages or subscriber extensions, and perhaps too conservative. We're considering being more proactive wth our ...
33
votes
0
answers
571
views
Mini Page Layout Hovers in Managed Package [closed]
Has anyone using the mini page layout popup technique listed here in a managed package had the package rejected in security review because of it?
This is obviously an unsupported technique, but given ...
31
votes
3
answers
6k
views
How to build custom UI that works both for users that have opted in to Lightning Experience and users that have not?
This isn't a question about the pros/cons of Lightning/Visualforce, but is a question about how to build custom UI for the period of time (a year or many years?) where some users/orgs have Lightning ...
31
votes
0
answers
1k
views
Managed Package Providers No longer able to access Debug Logs
I just wanted to double check because we are having trouble seeing debug logs for our extension packages in subscriber orgs. The main package which started it all works fine.
I am being told by SF ...
25
votes
1
answer
1k
views
Plans for obfuscation of Lightning Component source when delivered in a managed package?
This Enable Debug Mode for Lightning Components documentation says:
By default, the Lightning Component framework runs in production mode.
This mode is optimized for performance. It uses the ...
23
votes
2
answers
3k
views
Managed Package Integration without Extensions or Dependencies
Suppose I am developing a managed package and I want to build some additional packages that can integrate to it. Let's call the main package Package A.
I want to create a separate package (Package B)....
22
votes
7
answers
15k
views
How to get a list of the managed packages (including version numbers) installed in an org?
For a continuous integration setup, I only want to install/upgrade some packages (through the new InstalledPackage mechanism) when necessary. I've looked at the Metadata WSDL (and documentation) and ...
22
votes
2
answers
2k
views
How to show a Visualforce page on the first installation of the managed package?
I want to show the vf page on the first installation of the managed package, or it can be the custom setting page should open up on installation, where the user will add all the custom settings on the ...
21
votes
3
answers
7k
views
How to redirect to default namespace vf page from managed package vf page?
Question
If I'm on a managed package page, how can I link to a visualforce page in the default namespace without hardcoding the instance?
Background
I'm building a skuid page that has a custom ...
21
votes
1
answer
960
views
Do Custom Labels created by managed packages count against an Org's limit of 5,000 Custom Labels?
As of Winter '14, Salesforce imposes a limit of 5,000 Custom Labels per Org. That sounds like a lot, and would be for most Orgs, but I've noticed that many managed packages create a LOT of Custom ...
21
votes
2
answers
475
views
Friction-free process to switch to SalesforceDX with existing managed package
Dreamforce '17 made it crystal clear. Salesforce DX is ready for prime time. With Second-Generating Packaging SGP even for ISVs.
Salesforce DX is awesome, nonetheless we fear that getting started ...
20
votes
3
answers
10k
views
Protected Custom Settings in managed package are not visible by apex class
I'm facing a major problem is critical stage of my project:
I have packaged my app in a managed package (currently beta), including 5 custom setting objects, 2 of which are Protected.
The 2 protected ...
20
votes
2
answers
5k
views
WebServiceMock causing "CalloutException: You have uncommitted work pending" when creating managed package
I have a number of test methods that call Test.setMock(WebServiceMock.class, new SomeWebServiceMockImpl()); where SomeWebServiceMockImpl implements WebServiceMock.
These test methods pass when I run ...
19
votes
3
answers
3k
views
Not being able to reference packaged custom LWCs from other LWCs outside the package
This restriction referenced from Distribute Components on AppExchange:
A custom Lightning web component can’t access a Lightning web
component or module in a custom namespace. It can access ...
18
votes
3
answers
8k
views
When does it make sense to add a Connected App to a Managed Package?
I think I'm familiar with the difference between a connected app definition and its consumption:
As the vendor, my Connected App definition lives by himself in a dev org forever:
For the users, in ...
18
votes
2
answers
27k
views
How to retrieve layouts of customs objects belonging to a managed package?
I am trying to retrieve the layouts of all(standard + custom) objects from a test Enterprise org using package.xml manifest files. There are some customs objects that I have created on this org.
...
18
votes
0
answers
1k
views
Custom Labels in Packages - Potential BUG in Winter 19 (Confirmed as Known Issue by Salesforce)
We have an unmanaged package using 167 custom labels to use the Translation Workbench in Salesforce and to be able to translate texts into different languages.
Until now, all our custom labels have ...
17
votes
7
answers
3k
views
Custom Metadata vs. Custom Objects in Managed Package
I worked on Managed packages for nearly 10 years now and never missed Custom Metadata Types. Not before they came and not after they were announced. I didn't come across a single great and technical ...
17
votes
4
answers
22k
views
Get the list of users licensed for a Managed Package
I'm developing a managed package and I need the list of users with the license for the managed package within the package.
Any idea on where to start will help!
Overriding a standard button ...
17
votes
4
answers
10k
views
How to handle installed Managed Packages failing tests?
I have several AppExchange apps installed that are failing tests. What is the recommended approach to resolving this? Are tests run when a new package is installed? Is there a way to determine what is ...
17
votes
2
answers
779
views
How does Salesforce handle Managed Package Licences between Packages?
So I have a managed package we'll call Package Core. It has various components, incl custom fields on Account and Contact. It is licensed by user, and works as expected - no license, no access to the ...
15
votes
1
answer
2k
views
SFDX: Create unlocked package version - What is happening behind the scene?
When we are creating unlocked package version in 2GP, we don't need to have packaging org at all to deploy code there, upload package etc. (as it was with first generation packaging).
So we just ...
15
votes
6
answers
5k
views
What are the best practices for managing changing picklist values in managed packages?
One of the issues that we always see when creating new releases of our managed package is that new or changed picklist values don't deploy when someone upgrades our app using a new release that we ...
15
votes
1
answer
534
views
Any docs on the permissions of the special InstallHandler package user?
InstallHandler is the interface you implement for a post-install script in a managed package. Per the docs:
It runs as a special system user that represents your package, so all operations ...
15
votes
1
answer
1k
views
Detect if Apex Flex Queue is enabled in an Org
I have a managed package that starts a batch job.
Right now, before attempting to start the batch it does a check like:
integer batchJobLimit = 5;
integer currentBatchCount = [SELECT count()
...
14
votes
2
answers
2k
views
Extension packages & Licence Management in 2GP
In the first generation of Managed Packages (1GP), you are able to create Managed Extension packages that technically required a base package.
Both could be distributed and licensed using the same ISV ...
14
votes
1
answer
4k
views
Does SOQL SUM(CurrencyField__c) calculate correctly in MultiCurrency Org and how?
I have a managed travel expense app with an AggregateResult SOQL that sums up Expenses per Day. All expenses can have different currencies and don't have to match the corporate nor the current users ...
14
votes
1
answer
298
views
API 31.0 breaking change in namespaced Visualforce $Setup global
Has anyone encountered this problem when evaluating $Setup global variable in Visualforce?
If, in an organization with a namespace prefix, I have a hierarchy Custom Setting like the following,
it ...
14
votes
0
answers
2k
views
Managed Package error "Dependent class is invalid and needs recompilation"
I'm getting an exception email from a client who has installed my Managed Package in his org. The error message I receive is:
Apex script unhandled trigger exception by user/organization:
...
14
votes
3
answers
809
views
Issues rolling out new managed packages during the maintenance window
In the couple weeks between when Salesforce upgrades the first instances and when they have finished rolling the new version out to everyone, it is a struggle to get a new package out. Currently, our ...
13
votes
1
answer
536
views
Best practices for breaking 1 GP monoliths into 2GP modules
The wonderful capability to create 2GP Managed Extension Packages on top of 1GP Managed Base Packages is great luck for AppExchange partners that have built complicated and monolithic apps over the ...
13
votes
4
answers
3k
views
Order of execution managed vs. non-managed code
Does managed package trigger code always execute before the org's user defined trigger code?
(i.e. Is the before insert logic of all managed packages that are installed in an org executed before the ...
13
votes
4
answers
3k
views
Automatic package creation in Salesforce
I'm developing a managed package in Salesforce and I'd like to have continuous integration system to produce packages automatically and test it. I have everything stored in Git: classes, pages and ...
13
votes
2
answers
496
views
Specify "Install for" when installing package via Metadata API
Trying to automate some package installs via Apex using the Metadata API.
When you install a package via the UI you get asked who to install for (Defaults to Admins Only):
Is there any way to ...
13
votes
1
answer
842
views
Problems with deprecation in patch to minor release of managed package
I @deprecated some interfaces and methods in a minor release (v1.1) of my managed package. Now I'm working on a patch to that minor release (v1.1.1), using a freshly created patch org, and am getting ...
13
votes
1
answer
653
views
Install Managed Package Into Sandbox Fails on All Lightning Component Bundles
I have developed an app for the Salesforce platform and have successfully created a beta managed package ready for testing on one of our sandboxes. however when I try to install the package on the ...
12
votes
6
answers
2k
views
App disappears from Permission Set included with package
We're working on our first Salesforce package, and recently switched from creating Beta packages to a Managed Package.
For some reason, the permission set that we're pushing loses the entry in ...
12
votes
2
answers
3k
views
Push upgrade documentation
I've found great information on patch and push upgrades in the Salesforce Packaging Guide and help notes. Although the steps for creating patches are listed in detail in both areas of documentation, I ...
12
votes
8
answers
5k
views
Does Schema.GetGlobalDescribe() Account for Prefixes?
It seems to me that in my dev org at least, the keys for the map returned by Schema.GetGlobalDescribe() do not use namespace prefixes... so does anybody know what happens when there are two objects ...
12
votes
2
answers
3k
views
Is encrypting passwords in protected custom settings a security requirement?
Regarding the Salesforce security review process, can anyone confirm (or deny) that storing a connection URL, username and password for a webservice utilized by an appexchange app can be done in plain ...
12
votes
1
answer
2k
views
SFDX Second Generation Packaging - Managed Package questions
Looking at second generation packaging for managed packages and am a bit confused on feature parity with 1st gen with regards to managed packages..
Primary concern is that things are set up correctly ...
12
votes
1
answer
2k
views
Managed package callout invoked from managed package extension causing test class failure
We have a managed package that has executes a HTTP callout from a trigger that calls a future method on the insertion of new records on a particular object. We have a managed package extension that ...
12
votes
2
answers
3k
views
Connected apps available via Metadata API?
When developing apps for the AppExchange, we use a development workflow in which each developer has their own DE org, but commits to a common source code repository (git in this case). We then use a ...
12
votes
2
answers
8k
views
Deploying Profiles / Permission Sets that include object & field permissions for Managed Objects
Anyone know if it's possible to deploy profiles/permission sets via Eclipse or an Unmanaged Package that contain object & field permissions for 3rd party managed objects?
I'm trying to deploy a ...
12
votes
1
answer
1k
views
Not receiving all Apex Exception emails for Managed Package
We have a Managed Package deployed on several dozen orgs, and appear to be missing a lot of Apex Exception emails.
We do receive a number of such emails on a regular basis (so we know it's working ...
12
votes
2
answers
2k
views
Rolling back a managed released package?
We have a managed released package currently undergoing security review. While that is happening, we would like to make some changes to the tab layout of our application. Unfortunately, it seems that ...
12
votes
0
answers
177
views
Fluctuations in obfuscation of managed package details
I've seen Salesforce obscure certain details about a managed package when it was deployed in a subscriber org. For instance, the debug logging generated from the managed package namespace isn't ...