cli icon indicating copy to clipboard operation
cli copied to clipboard

Add support for missing package settings

Open DavinCasey opened this issue 7 years ago • 5 comments

Currently, it is not possible to set the following package settings via SFDX:

  • apiAccessLevel
  • postInstallClass
  • setupWebLink

What are you trying to do We're trying to have a seamless packaging & release process via CI.

Describe the solution you'd like force:source:convert has a --packagename parameter which allows us to set the <fullName> element in package.xml. I'd like to see additional parameters to allow us to specify values for the settings listed above.

Describe alternatives you've considered The only workable options we have right now are hackish workarounds:

  • Manually maintain a package.xml file with postInstallClass etc. set
  • Use an XML editing tool in our CI process to insert the missing package setting elements into package.xml.

DavinCasey avatar Jan 17 '19 10:01 DavinCasey

@DavinCasey thanks for the suggestion. I'm not a packaging expert, but the experts will see this request. In the mean time and for my own edification, at what point are those values set if working through the Salesforce UI?

dcarroll avatar Jan 17 '19 16:01 dcarroll

In the Salesforce UI, you can go to the Package, click edit and you'll have options for Post Install Script, Uninstall Script, Configure Custom Link etc. These are the settings we need to set when deploying our code to the packaging org.

If these values are not set in package.xml when deploying, the next version of the package (which is uploaded via our CI pipeline too) is uploaded WITHOUT a specified Post Install script or 'Configure' custom link. This is a huge problem for our customers as both settings are vital to customers in installing & using our app.

DavinCasey avatar Jan 18 '19 09:01 DavinCasey

Hey @dcarroll have you guys had a chance to look into this one yet?

DavinCasey avatar Apr 25 '19 20:04 DavinCasey

Definitely a bit blocker for us too! The fact that those settings get cleared out every time we push code to our packaging org is puzzling.

mzanini avatar Mar 29 '22 23:03 mzanini

We currently use sfdx force:source:deploy to deploy our code to the packaging org for a first generation managed package. It would be good to have an option to specify a postInstallScriptClass as an option when executing that command.

mzanini avatar Mar 29 '22 23:03 mzanini

@mzanini I'm having a hard time understanding the connection between source:deploy (deploy metadata to an org) and the packaging (1GP,2GP) options like postInstallScriptClass that would run after a package:install.

Are you saying that when you deploy code, it's changing the settings on your package in the packaging UI?

mshanemc avatar Feb 06 '23 18:02 mshanemc