Skip to main content
14 events
when toggle format what by license comment
May 26, 2021 at 9:44 comment added Gabriel Serrano Salas When I used SFDX force:source:push I pushed all metadata together with installedPackage and it worked just properly. If you package have dependancies on other package you can alwats configure your sfdx-project.json file > packageDirectories and separate your dependancies in folders.
May 26, 2021 at 8:04 comment added Phil W To follow up, I don't remember the details now but this didn't work for me. Perhaps because my packages to install all have installation keys?
Apr 29, 2020 at 20:13 comment added Phil W I'm going to give setting up the installedPackage instances a go and see where I get.
Apr 29, 2020 at 20:11 comment added Phil W Hey @MartyC. I don't think it can be the namespace since multiple 2GPs can share the same namespace. It must be the package name. That said, I got to the point where I tried to use aliases (the package name and version number like "Package [email protected]") on the CLI with force:package:install and this didn't work - it needs to have the mapping of the alias to the package ID it seems...
Apr 29, 2020 at 20:01 comment added Marty C. Andrej's answer looks worth a try, to see if that will automatically install dependencies. The downside there is that it seems you'll need to know the unique package ID, instead of the more conventional namespace and version.
Apr 29, 2020 at 19:58 comment added Marty C. @PhilW you can install multiple packages in the same push or deployment with sfdx, and with the Metadata API as well. However, if there are dependencies, in my experience Salesforce won't know which package to install first. In those situations you'll have to manually script the correct order of deployments.
Apr 29, 2020 at 19:57 comment added Marty C. @PhilW the name of the file must match exactly the managed package's registered namespace, including the case. For example, SBQQ in all caps is the Salesforce CPQ package and sbaa is the Salesforce Advanced Approvals package. The filenames for these two packages would be SBQQ.installedPackage-meta.xml and sbaa.installedPackage-meta.xml respectively.
Apr 29, 2020 at 10:48 comment added Phil W Also, what drives the naming of the installedPackage file? I assume it is the package's name, so would be "Expense Manager.installedPackage-meta.xml" if I wanted to install the 2GP package "Expense Manager" from the example in step 7 in workflow for second-generation packages?
Apr 29, 2020 at 9:45 comment added Phil W According to the documentation for the InstalledPackage metadata type "You can’t deploy a package along with other metadata types. When you deploy InstalledPackage, it must be the only metadata type specified in the manifest file". Does this cause issues also when pushing this to a scratch org where the project includes more than just these InstalledPackage instances?
Jun 11, 2019 at 17:49 comment added BrBarr This worked for me as well.
Mar 21, 2019 at 16:34 comment added Marty C. Hi @ThomasTaylor you can definitely try and let us know! My initial guess would be "no", because there's no package prefix to put into the filename, but there may be some other workaround or special notation that makes magic happen.
Mar 16, 2019 at 0:59 comment added Thomas Taylor Can you do this for an unmanaged package? eg, the packages used for some Trailhead Superbadge setups?
Mar 11, 2019 at 9:32 comment added J. Schreiber I can confirm, that this also works for another tested Package: Cloud Coach Milestones. I added a CCMI.installedPackage-meta.xml. This answer is definitely underrated.
Dec 5, 2018 at 20:22 history answered Marty C. CC BY-SA 4.0