Package

Specifies which metadata components to retrieve as part of a retrieve() call or defines a package of components.

Parent Type 

This type extends Metadata and inherits its fields.

Fields 

apiAccessLevel 

  • Type: APIAccessLevel (enumeration of type string)

  • Required: No

  • Description: Package components have access via dynamic Apex and the API to standard and custom objects in the organization where they’re installed. Administrators who install packages can restrict this access after installation for improved security. The valid values are:

    • Unrestricted—Package components have the same API access to standard objects as the user who is logged in when the component sends a request to the API.
    • Restricted—The administrator can select which standard objects the components can access. Further, the components in restricted packages can only access custom objects in the current package if the user’s permissions allow access to them.

description 

  • Type: string
  • Required: No
  • Description: A short description of the package.

fullName 

  • Type: string
  • Required: No
  • Description: The package name used as a unique identifier for API access. The fullName can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. This field is inherited from the Metadata component.

namespacePrefix 

  • Type: string
  • Required: No
  • Description: The namespace of the developer organization where the package was created.

objectPermissions 

  • Type: ProfileObjectPermissions[]
  • Required: No
  • Description: Indicates which objects are accessible to the package, and the kind of access available (create, read, update, delete).

packageType 

  • Type: string
  • Required: No
  • Description: Reserved for future use.

postInstallClass 

  • Type: string
  • Required: No
  • Introduced: API version 24.0
  • Description: The name of the Apex class that specifies the actions to execute after the package has been installed or upgraded. The Apex class must be a member of the package and must implement the Apex InstallHandler interface. In patch upgrades, you can’t change the class name in this field but you can change the contents of the Apex class. The class name can be changed in major upgrades.

setupWeblink 

  • Type: string
  • Required: No
  • Description: The weblink used to describe package installation.

types 

uninstallClass 

  • Type: string
  • Required: No
  • Introduced: API version 25.0
  • Description: The name of the Apex class that specifies the actions to execute after the package has been uninstalled. The Apex class must be a member of the package and must implement the Apex UninstallHandler interface. In patch upgrades, you can’t change the class name in this field but you can change the contents of the Apex class. The class name can be changed in major upgrades.

version 

  • Type: string
  • Required: Yes
  • Description: Required. The version of the component type.

PackageTypeMembers Type 

Use to specify the name and type of components to be retrieved in a package.

Fields 

members 

  • Type: string[]
  • Required: No
  • Description: One or more named components, or the wildcard character (*) to retrieve all metadata components of the type specified in the <name> element. To retrieve a standard object, specify it by name. For example, <members>Account</members> retrieves the standard Account object.

name 

  • Type: string
  • Required: Yes
  • Description: The type of metadata component to be retrieved. For example, <name>CustomObject</name> retrieves one or more custom objects as specified in the <members> element.

Wildcard Support in the Manifest File 

This metadata type doesn’t support the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!