20
votes
Accepted
Query for Package Ids installed on an org?
Just run the following command:
sfdx force:package:installed:list -u <alias|username>
This will give you all of the packages installed, including the 04t "AllPackageVersion" Id that you need ...
8
votes
Accepted
Can't assign permission set to my user after installing Salesforce Data Mask!
It was not really clear from the announcement or from most of the documentation, but Salesforce Data Mask is actually a paid feature, and if you want to use it you need to talk to your Account Execute ...
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 ...
6
votes
How to we get list of Installed packages and it version number
Contrary to some answers, you can use SOQL to retrieve this information. You just can't use it in Apex.
In the developer console, if you check the "Use Tooling API" option, the following ...
5
votes
Accepted
How to Check whether my install handler works properly?
Here is one (of many) test methods for an install handler in our code:
@IsTest
static void testAdls() {
// Clear to make sure the value is set by the install handler
Options__c cs = ...
5
votes
Accepted
Is there any way to make a shell script to automate creation and preparation of a scratch org wait between steps?
Use the -w parameter so that each command waits for confirmation, and things proceed in order:
sfdx force:org:create -w 10 -s -f ./config/project-scratch-def.json -a ScratchOrg
sfdx force:package:...
4
votes
I created an unmanaged package in a Developer org, but I can't figure out how to install it into a sandbox
Once you get the unmanaged package link ,you will replace login with test
Lets say your unmanaged package link is
https://login.salesforce.com/packaging/installPackage.apexp?p0=04t28000000B4ng
...
4
votes
Accepted
Package and Installation via app exchange
The subscriber org cannot update the callback and Canvas URL once packaged .
In this case its preferred to have administration instructions for the org administrator to create the connected app while ...
4
votes
How to we get list of Installed packages and it version number
The Salesforce CLI (sfdx) makes it very easy to get a list of installed packages and their version ids:
sfdx force:package:installed:list
Output:
{
"status": 0,
"result": [
...
4
votes
Accepted
SFDX Can query Package Installation Status, can we?
There is a tooling object for same for that named "packageinstallrequest" .
You can query status field to know the install request status
https://developer.salesforce.com/docs/atlas.en-us....
4
votes
Managed Package Released Type
The relevant documentation reference is the ISVforce Guide, under Editing Components and Attributes After Installation. It covers most metadata types and explains the manageability rules that will be ...
4
votes
Accepted
Best way to detect that code is running in InstallHandler context?
Just for the record, consensus is an Apex static variable that the InstallHandler implementation sets and other code tests i.e.:
/**
* Referenced by triggers.
*/
public inherited sharing class ...
4
votes
Accepted
Maximum Number of Packages That Can Be Installed
There is no such limit on number of Managed packages installed (Assumes its approved Managed package listed on AppExchange). However you need to mindful of total custom object limits for the Edition, ...
3
votes
Accepted
Missing Organization Feature: NetworksEnabledOnce
To avoid this error is necessary to have communities enable first
Setup -> Communities -> All Communities
3
votes
Magic Mover for Notes And Attachments to Lightning Experience package installation error
You missed configuration steps prior installation
From installation guide:
Before installing the AppExchange package, the Set Audit Fields upon Record Creation org permission is required. When we ...
3
votes
Accepted
How to update a managed package when some VF controllers are deleted?
Salesforce is a little finicky when it comes to removing stuff. Unfortunately (and I've lived through this before), removing pages and controllers is a two step process.
First, you have to make sure ...
3
votes
How to handle dynamic namespace when packaging lightning components in managed package?
You can get away with the problem of namespace in your lightning components by crafting your own wrapper class structure for your data attributes.
The blog post here describes how to create message ...
3
votes
Accepted
"Invalid field" error in Visualforce page during package installation
It seems to be namespace issue:
Try replacing to below syntax:
<span id="gaconnector_pages_visited_list"><apex:outputField value="{!lead.Pages_visited__c}" /> </span>
3
votes
How to we get list of Installed packages and it version number
Not doable via sOQL. Using JSForce, you can do a Metadata Retrieve requesting the following members
conn.metadata.retrieve({
apiVersion: '39.0',
singlePackage: true,
unpackaged: {
...
3
votes
What is salesforce spark edition?
Spark Edition is likely a version of Personal Edition or Free Edition, rebranded to fit the Lightning theme (a Spark is smaller bit of electricity than Lightning). These orgs were extremely limited in ...
3
votes
Accepted
Assign Permission Set on Package Installation
You can create a class which implements InstallHandler interface and write your logic in onInstall method this method will be invoked after package installation.
global class PostInstallClass ...
3
votes
Is it possible to upgrade a managed package from different salesforce sandbox than the original from which it was created?
No. Each managed package is tied to a specific developer org. It cannot be migrated to another developer edition org. If you've lost access to that developer edition, you will have no way to upgrade ...
3
votes
Accepted
Running the packaged tests while installing with sfdx:force:package:install
So far you can't. The only thing you can run is Apex Classes compilation with the --apexcompile flag.
However, starting Winter 21, code coverage should be enforced for Unlocked Packages installation.
...
3
votes
Accepted
When a former employer or consultant installed a managed package which can't easily be identified, how can I get the package Id?
SFDX conveniently has a feature that does this.
sfdx force:package:installed:list -u org-name-or-alias
You can directly use the package Ids from the list to install the packages into other orgs. Note ...
3
votes
Cannot install custom metadata types to another org
Note that there are two parts to the Custom Metadata Type - there's the type itself and the Custom Metadata Type records. For what you are doing you need to make sure you have both in the package.
If ...
3
votes
Accepted
Can I Install a Salesforce Package, that is dependent on another package, without installing the dependent Package?
By dependent if you mean your OMI package has any references (class, page, components etc) to LTI, then NO. Compilation has to happen properly before a package gets installed.
If the package does not ...
3
votes
SFDX or API Call to Install Package using Profile Mapping
You can do it from the Tooling API by creating a PackageInstallRequest record in the target org.
This object includes a field ProfileMappings that allows you to specify the source Profile name (in ...
3
votes
How to check if the managed package is installed for admin or for all users or for specific profile?
Strictly speaking, you can't; this information isn't recorded as such anywhere.
Installing for admins or all users or specific profiles actually just grants the selected profiles access to all managed ...
3
votes
Trouble Installing new 2GP Managed Package from App Exchange
The ability to run Apex code is limited in Group and Essential Editions to Managed Packages that have "Aloha status" (whatever they call it today). This permission is what allows managed ...
2
votes
Accepted
How can I create an OEM package and test it
An OEM package is basically the same thing as a normal managed package; OEM vs. ISV is about who's providing licensing. With the OEM licensing model, you create contracts with salesforce.com for the ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
package-install × 158managed-package × 87
package × 33
salesforcedx × 17
postinstall × 15
apex × 14
appexchange × 9
scratch-org × 8
unmanaged-package × 8
beta-managed-package × 8
deployment × 7
sandbox × 7
isv × 7
package-dependency × 7
visualforce × 6
permission-sets × 5
app × 5
unlocked-package × 5
2gp × 5
lightning-aura-components × 4
permissions × 4
profile × 4
salesforcedx-cli × 4
lightning × 3
community × 3