Represents a package that has been developed in the org you’re logged
in to. Applies to unlocked, unmanaged, first-generation, and second-generation managed
packages.
Supported Calls
describeSObjects(), query(), retrieve()
Fields
| Field Name | Details |
|---|---|
| Name |
|
| NamespacePrefix |
|
| PackageCategory |
|
Usage
Here are examples of the types of API queries you can perform.
| Query | String |
|---|---|
| Show all managed and unmanaged packages in the org | SELECT Name, NamespacePrefix FROM MetadataPackage |
| Show only managed packages in the org | SELECT Name, NamespacePrefix FROM MetadataPackage WHERE NamespacePrefix <> '' |