Newer Version Available

This content describes an older version of this product. View Latest

Package2Version (Beta)

Represents a second-generation package version in a Dev Hub org. Available in API version 41.0 and later.

This release contains a beta version of Second-Generation Packaging, which means it’s a high-quality feature with known limitations. Second-Generation Packaging isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only based on generally available products and features. You can provide feedback and suggestions for Second-Generation Packaging in the Salesforce DX Packaging 2 Beta group in the Trailblazer Community.

Second-generation packaging lets you create developer-controlled packages or managed packages. We support developer-controlled packages through an open pilot program. These packages are designed for enterprise customer use cases, but ISVs can also use them during package development. Pilot programs are subject to change. You can install developer-controlled packages in scratch or sandbox orgs but not in a production org. Check out the Trailblazer Community for details on developer-controlled packages.

Note

Supported SOAP Calls

query(), retrieve(), update()

Supported REST HTTP Methods

Query, GET, POST

Fields

Field Details
Branch
Type
string
Properties
Filter, Group, Nillable, Sort, Update
Description
The branch associated with this package version. Can be used to create a tree structure of inheritance.
BuildNumber
Type
int
Properties
Filter, Group, Sort
Description
Part of the version number of a package version. The complete version number format is major.minor.patch.build—for example, 1.2.0.5.

The build number can also be NEXT or LATEST instead of a number.

Description
Type
string
Properties
Filter, Nillable, Sort, Update
Description
Description of the package.
InstallKey
Type
string
Properties
Filter, Group, Nillable, Sort, Update
Description
Installation key for creating the key-protected package. The default is null.
IsBeta
Type
boolean
Properties
Defaulted on create, Filter, Group, Sort, Update
Description
Indicates whether the package version is released (false) or in beta (true).
IsDeprecated
Type
boolean
Properties
Defaulted on create, Filter, Group, Sort, Update
Description
Specifies whether this package version has been marked as deprecated (true) or not (false).
IsPasswordProtected
Type
boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
Specifies whether installation of this package version requires the user to provide an installation key (true) or not (false).
MajorVersion
Type
int
Properties
Filter, Group, Sort
Description
Part of the version number of a package version. The complete version number format is major.minor.patch.build—for example, 1.2.0.5.
MinorVersion
Type
int
Properties
Filter, Group, Sort
Description
Part of the version number of a package version. The complete version number format is major.minor.patch.build—for example, 1.2.0.5.
Name
Type
string
Properties
Filter, Group, Sort, Update
Description
Name of the package.
Package2Id
Type
reference
Properties
Filter, Group, Sort
Description
ID of the parent package (starts with 0Ho).
PatchVersion
Type
int
Properties
Filter, Group, Sort
Description
Part of the version number of a package version. The complete version number format is major.minor.patch.build—for example, 1.2.0.5.

Currently, the only valid value is 0.

SubscriberPackageVersionId
Type
reference
Properties
Filter, Group, Sort
Description
ID that subscribers use to install the package version (starts with 04t).

This value is case-sensitive and must be unique.

Tag
Type
string
Properties
Filter, Group, Nillable, Sort, Update
Description
The package version’s tag.