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.
229
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 ...
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:
{!...
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 ...
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 ...
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)....
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 ...
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.
...
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 ...
11
votes
1
answer
1k
views
Dynamic trigger creation from managed package
I have a requirement to create triggers dynamically after a managed package is installed. I have read that the tooling API can be used to create triggers dynamically however it cannot be used in ...
7
votes
1
answer
1k
views
Issue with GlobalDescribe Field Results and Managed Package
Situation:
Managed Package
Class is global class
Field Named NS__Field_Name__c
Running in subscriber org
code:
String fld = 'NS_Field_Name__c';
Map<String,sobjectField> flds = object__c....
6
votes
2
answers
2k
views
are custom fields deletable from a managed package?
I see this has been asked before but this doc seems to indicate that custom fields are developer deletable (pg 29), am I missing something? I don't see any way to delete them.
https://na15.salesforce....
3
votes
1
answer
1k
views
2GP Source Push Error: The consumer key is already taken
I am trying to migrate metadata from a Partner Developer org to a Partner Developer scratch org for use with second-gen packaging.
I have downloaded the 1GP package, converted the metadata, and now I ...
3
votes
2
answers
2k
views
Querying Managed package version from Apex
Is it possible to query the version number of an installed managed package? I do not find any information in the PackageLicense object. If not, what is the alternative approach?
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 ...
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 ...
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 ...
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 ...
11
votes
6
answers
14k
views
Installing managed packages to Scratch org via configuration
We've recently started adopting Salesforce DX and we're trying to figure out the best way to spin up Scratch orgs.
As of now, we have multiple managed packages from the AppExchange installed in ...
10
votes
2
answers
5k
views
Connected App in Managed Package
As a part of our development process we have a trunk and stable packaging org. Normally features get merged in to stable from trunk once they have been tested and approved.
I have added a Connected ...
10
votes
1
answer
1k
views
Should DX Unlocked packages be used for app distribution to customers
Unlocked Packages are just the perfect compromise for everybody working with Salesforce code that he is delivering (for money) to a customer (or two).
Managed packages are too much overhead (become a ...
10
votes
1
answer
1k
views
SOQL dynamic query issue - managed package
Stuck with an issue related to Dynamic SOQL queries in Managed package.
As an example in our package, we have a object and field named as sf_com_bh__Application__c and ...
9
votes
1
answer
965
views
Can the production org id corresponding to a sandbox org id be found via Apex?
The use case is that we have added additional licensing parameters to the LMA License object that our managed package reads from the LMA via a @RestResource site added to the LMA org.
This works ...
7
votes
1
answer
332
views
How to access Winter 13's Push Major functionality
We are ISV Partners and all of our packaging orgs have been upgraded to Winter 13. One of the features of Winter 13 was supposed to allow us to push major release versions to subscriber orgs. I would ...
7
votes
3
answers
8k
views
Access to debug logs in managed package
Should you need a custom logging class for your managed package? I'm aware that you can use subscriber support but is there any benefit of using custom logging?
If you do implement a custom logger, ...
7
votes
1
answer
4k
views
Why are visualforce pages served from a different domain?
There are a number of reasons why this is frustrating. The biggest for me is that embedded visualforce pages can't use JavaScript to access the parent frame.
There doesn't seem to be any benefit ...
3
votes
1
answer
2k
views
How to access a protected custom setting info in managed package
So, we uploaded the managed package and installed it in a new org (as the clients would) but when querying from an apex class the (protected) custom setting fields it throws an exception as if the ...
2
votes
1
answer
891
views
Cannot update Custom Metadata records from Subscriber org in managed app
The custom fields are subscriber editable, and the custom metadata is not protected.
I can update the field values in developer org in a managed app, but when I try to update in subscriber org in ...
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 ...
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 ...
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 ...
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
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
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 ...
11
votes
1
answer
4k
views
Issues with managed package visibility?
Question
Is anyone experiencing issues with incorrect managed package apex class visibility? Suddenly unable to save a class and everything seems to be in order. What am I missing? Anyone run into ...
10
votes
1
answer
1k
views
Is it possible to access static resource of a managed package in a local VF page
Is it possible to access a static resource of a managed package in your local environment?
Thanks
10
votes
3
answers
3k
views
Can't install managed package because packaged permission set seems to have lost a read permission
I developed a Managed Extension Package. When I try to install it or create a patch org for it, this fails with no error but the note to call Salesforce.
Support told me that it fails due to:
...
9
votes
3
answers
11k
views
Manage Package upgrade failure - couldn't retrieve the design time component information for component X
I released a Managed Package version 1.1 and installed on both Developer Org D1 and Sandbox Org S1.
Later I added a new Lightning Component and Lightning Record Page to the Package and released a ...
8
votes
3
answers
2k
views
Email Service via Metadata API fails to create from Managed Package
As Email Services can't be packaged in a Managed Package, I allow subscribers to create it after the installation. The code which works in my packaging org fails in productions orgs with:
An Apex ...
8
votes
1
answer
1k
views
Unable to implement HTTPMock from Managed package in Local Test Methods - Complete example with package
A while ago SF began failing tests that make callouts without an HTTP mock. When they did that we were unable to deploy some trigger as a managed package made a callout whenever an Opportunity was ...
7
votes
3
answers
5k
views
I have a managed package, if I add values a picklist, will my customers get it on an upgrade?
I have a managed package. I have a picklist about where to store something. If the picklist has "Files" and "Notes and Attachments", and I want to add "Content" as an enumeration, when I make a new ...
7
votes
1
answer
1k
views
Packaging system permissions in permission sets
I'm trying to package 'Customize Application' system permission in a permission set. However, after installation I see that the permission set does not have the system permissions that were assigned.
...
7
votes
2
answers
12k
views
Assigning Managed Package Licenses in a Sandbox
In our production organization, we can access the following page either through a related list on the User object (Manage Licenses) or through a link in Installed Packages next to the package.
We ...
7
votes
3
answers
5k
views
Installed Package information, specifically Status
Is it possible to get information on the package through APEX after it has been installed? Specifically I want to know the Status (see below)
The reason I want this is because I want to show ...
7
votes
2
answers
3k
views
How to remove a custom field from a managed package referenced in a custom report type?
Question
Is there anyway to get rid of custom field in a managed package that has been referenced in a custom report type for that managed package?
Background
I've built a managed package and for ...
6
votes
1
answer
473
views
Deprecate or remove an Apex Invocable Action from Process Builder in a Managed Package
We released global facing Invocable Apex Actions to be used by Process Builder, but would like to hide a couple of them from subscribing orgs.
From the official documentation on invocable methods, ...
6
votes
3
answers
6k
views
Apex: Getting namespace prefix
We have a scenario where we need to make assignments to fields using the method put(String, Object)
Ref:
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/...
6
votes
1
answer
962
views
How to let the end users override CSS of managed package's LWC?
I am rewriting a complex Visualforce component into LWC. It's an activity timeline / Gantt chart that's part of a managed package.
The old version let the end users override the bar colo(u)rs with a ...