Salesforce Asked by mkorman on December 17, 2021
I’m upgrading our build system to use sfdx
, and I’m trying to automate all packaging operations for our managed package.
Once a new package version has been created via sfdx
, I would like to retrieve the package installation URL so that I can document it somewhere. I tried using sfdx force:package1:version:display
, but I was surprised to see that it only returns things I already know and supplied at build time (package name, version and ID). There is no sign of the package install URL.
Is there a way to programmatically retrieve the install URL from a package that I just created with sfdx?
Edit: apparently the install URL can be created like this:
https://login.salesforce.com/packaging/installPackage.apexp?p0=<package version ID>
Would this work?
Edit: I’m using 1st generation packaging (1GP). I’m not planning to use 2GP.
You can add the --verbose flag to sfdx force:package:version:list and it will give you the Installation URLs
sfdx force:package:version:list --verbose
Answered by Samir Awuapara on December 17, 2021
This is the solution I used in the end. I build the install URL by concatenating a well-known string with the package ID, as follows:
https://login.salesforce.com/packaging/installPackage.apexp?p0=<package version ID>
This is working well so far for us, although it feels like a workaround
Answered by mkorman on December 17, 2021
You can use this command
sfdx force:package:installed:list
Once you've got your 1GP package Id, you can use DX to install the package to your org, eg:
sfdx force:package:install -p 04tf2000002Fg1SAAS
Answered by vorno on December 17, 2021
package:version:create:report
Retrieves details about a package version creation request in the Dev Hub org.
sfdx force:package:version:create:list -v DevHub1
sfdx force:package:version:create:report -i 08c2v000000KzJsAAK -v DevHub1
*=== Package Version Create Request NAME VALUE ───────────────────────────── ───────────────────────────────────────────────────────────────────────────────── ID 08c2v000000KzJsAAK Status Success Package Id 0Ho2v000000bleCCAQ Package Version Id 05i2v000000TNQ5AAO Subscriber Package Version Id 04t2v************G Tag Branch Created Date 2019-12-05 18:43 Installation URL https://login.salesforce.com/packaging/installPackage.apexp?p0=04t2v************G*
Answered by user70329 on December 17, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP