Newer Version Available

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

Package2

Represents a second-generation managed package or an unlocked package in a Dev Hub org. Values for all fields are visible to the subscriber. Available in API version 41.0 and later.

Supported SOAP Calls

create(), query(), retrieve(), update(), upsert()

Supported REST HTTP Methods

Query, GET, POST

Fields

Field Details
ContainerOptions
Type
picklist
Properties
Create, Filter, Group, Restricted picklist, Sort
Description
Container options for the second-generation package. These options determine the upgrade and editability rules. The default value is Managed.
Valid values include:
  • Managed (developer-managed, subscriber-managed)
  • Unlocked (developer-controlled, subscriber-editable)
Description
Type
string
Properties
Create, Filter, Nillable, Sort, Update
Description
Description of the package.
IsDeprecated
Type
boolean
Properties
Defaulted on create, Filter, Group, Sort, Update
Description
Specifies whether this package 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.

Name
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Name of the package. Unlike a typical developer name, this value is mutable and can contain special characters.
NamespacePrefix
Type
string
Properties
Create, Filter, Group, Nillable, Sort
Description
Namespace prefix that identifies the components of your package in the subscriber’s org.
SubscriberPackageID
Type
reference
Properties
Filter, Group, Sort, Unique
Description
ID that identifies this package across all Salesforce instances (starts with 033).

This value is case-sensitive and must be unique.

IsOrgDependent
Type
boolean
Properties
Filter, Group, Sort
Description
Indicates whether the package depends on unpackaged metadata in the installation org (true) or not (false). This field only applies to unlocked packages. The default value is false. Available in API version 49.0 and later.

Usage

Subscribers install package versions (Package2Versions) in their orgs.