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. Values for all fields except for Tag and Branch are visible to the subscriber. Available in API version 41.0 and later.

As a beta feature, Second-Generation Packaging is a preview and isn’t part of the “Services” under your master subscription agreement with Salesforce. Use this feature at your sole discretion, and make your purchase decisions only on the basis of generally available products and features. Salesforce doesn’t guarantee general availability of this feature within any particular time frame or at all, and we can discontinue it at any time. This feature is for evaluation purposes only, not for production use. It’s offered as is and isn’t supported, and Salesforce has no liability for any harm or damage arising out of or in connection with it. All restrictions, Salesforce reservation of rights, obligations concerning the Services, and terms for related Non-Salesforce Applications and Content apply equally to your use of this feature. You can provide feedback and suggestions for second-generation packaging in the Packaging 2 Beta group in the Trailblazer Community.

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.
This value is auto-populated from Package2VersionCreateRequest, but you can update it.
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 (Beta build)—for example, 1.2.0 (Beta 5). For released packages, version numbers contain only major.minor.patch, or, if patch is 0, major.minor—for example, 1.2.
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.

If you query for this value, the returned value is always null (for security reasons). The value can be set and reset but not read.

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). The default value is false.
If you set IsDeprecated to true for a package, the package and all of its child package versions are deprecated.

If you set IsDeprecated to false for a package, the package and all of its child package versions are undeprecated. However, if IsDeprecated is explicitly set to true for a package version after its parent package is deprecated, the child remains deprecated even if you undeprecate its parent.

If you set IsDeprecated to false for a package version whose parent package is deprecated, the package version’s IsDeprecated value remains true until its parent is undeprecated.

Deprecated package versions that have been installed in subscriber orgs continue to function, but new installations of deprecated package versions are blocked.

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). The default value is false.
IsReleased
Type
boolean
Properties
Defaulted on create, Filter, Group, Sort, Update
Description
Indicates whether the package version is released (true) or in beta (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 (Beta build)—for example, 1.2.0 (Beta 5). For released packages, version numbers contain only major.minor.patch, or, if patch is 0, major.minor—for example, 1.2.
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 (Beta build)—for example, 1.2.0 (Beta 5). For released packages, version numbers contain only major.minor.patch, or, if patch is 0, major.minor—for example, 1.2.
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 (Beta build)—for example, 1.2.0 (Beta 5). For released packages, version numbers contain only major.minor.patch, or, if patch is 0, major.minor—for example, 1.2.

Currently, the only valid value is 0.

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

This value is read-only.

Tag
Type
string
Properties
Filter, Group, Nillable, Sort, Update
Description
The package version’s tag.
This value is auto-populated from Package2VersionCreateRequest, but you can update it.