1
  1. When I create an unlocked package, I want to also specify the description for it. How can I do it?

enter image description here

  1. When I create a new package version I use the -e flag to indicate description however I don't see it anywhere

sfdx force:package:beta:version:create -p "MyPackage" -e "my description which does not appear...." -x -w 100

to summarize, I have three questions:

  1. how do I populate the Description under Setup->Installed Packages for packages?
  2. Where do I see the description I add to the each package version using the -e flag?
  3. What is the difference between -e (VERSIONDESCRIPTION) and -t (TAG ) flags?

3 Answers 3

1

How do I populate the Description under Setup->Installed Packages for packages?

The documentation, isn't very clear since it could be construed as applying only to managed 2GPs, but you can define the package versionDescription in your unlocked package's sfdx-project.json, like this:

{
  "sfdcLoginUrl": "https://login.salesforce.com",
  "sourceApiVersion": "56.0",
  "packageDirectories": [
    {
      "path": "force-app",
      "default": true,
      "package": "My Package Name",
      "versionNumber": "1.0.0.NEXT",
      "versionDescription": "My package version description",
      "definitionFile": "config/project-scratch-def.json",
      "dependencies": [
        {
          ...
        }
      ]
    }
  ],
  ...
}

If you already created a version without a description, you can add it by using the sfdx force:package:version:update (or beta equivalent) command, using the sfdx-project.json or -e CLI value.

Where do I see the description I add to the each package version using the -e flag?

You can see these descriptions by running the sfdx force:package:list on your CLI. You also see the package description in the Installed Packages list on your target org.

Installed Packages with Descriptions

What is the difference between -e (VERSIONDESCRIPTION) and -t (TAG ) flags?

As to the CLI override options -e (for overriding the versionDescription) and -t (for setting the tag), I can't answer that since I'm not sure what the version tag is - it doesn't seem to be the alias or name (though it could be one of these).

I'm guessing this is intended to allow you to express the git tag related to this package version.

10
  • hi Phil, thank you for your answer. From my understanding, sfdx force:package:list will show only package description and not package version description. btw, when I run sfdx force:package:version:list I get a big table but none of the columns is the description.
    – Json
    Commented Jan 7, 2023 at 19:36
  • Also the UI doesn't show me the description, I tried to add both in the sfdx-project.json and with a flag -e
    – Json
    Commented Jan 7, 2023 at 19:37
  • Weird. We only use the version description and that is what my answer shows here.
    – Phil W
    Commented Jan 7, 2023 at 20:01
  • Is this a plain unlocked package or some other variant, such as org dependent?
    – Phil W
    Commented Jan 7, 2023 at 23:28
  • plain unlocked package, I can add more information to the question if you are looking for something specific
    – Json
    Commented Jan 8, 2023 at 14:12
0

I am a bit late to the party, but here are a few tidbits that I think we can arrange into something useful:

  1. There is a "Package Visualizer" appexchange app that is quite good at showing packages and versions for a given dev hub. It has a field for package description and a field for package version description. They are different and are set in different commands, as you know.

  2. The package description is shown in the Installed Packages list in an org, with a bold Description label. Installed Packages listing for Apex Rollup showing version name, version number, and package description

    Please note that the columns are the Package Name, the Publisher, the Version Number, and the Package Description.

    I made a managed package and set the Version Description and Package Description to different values, and I cannot see where the Version Description is ever shown to end-users.

  3. There is no place in the project to display or to edit the package description, so it is entirely possible that James set that description to the same value... but it's not in his repo, and I highly doubt that he would manually set it with every version release; I also doubt he changes the description for every package version.

  4. Since package version description appears to be used in zero places outside of the ISV's CLI objects (package version), I think it can safely be ignored for now. After all, if a description is written but never seen, is it really a description?

Having said all that, I think that the answer you seek is this:

  • Package Version Description - set via sfdx-project.json and only useful for internal use by the ISV/developer
  • Package Description - set via sf cli command sf package update --description <description> sf cli reference and visible in Installed Packages list
0

As of Salesforce CLI version 2.47.6-6b39a27

To update package description :

sf package update --description "insert-your-description" --package "insert-your-package"

You need to have --package flag otherwise command won't work

To update package version description :

Update your sfdx-project.json e.g.

"versionDescription": "Ensured compatibility with Salesforce v61.0"

Then you do

sf package version create --package packageName --installation-key installationKey --wait 10 --target-dev-hub DevHub

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .