PackageVersionHeader
Specifies the package version for each installed managed package.
A managed package can have several versions with different content and behavior. This header allows you to specify the version used for each package referenced by your API client.
If a package version isn’t specified, the API client uses the version of the package specified in Setup. From Setup, enter API in the Quick Find box, select API, and then click Configure Enterprise Package Version Settings under Enterprise Package Version Settings.
This header is available in API version 16.0 and later.
convertLead(), create(), delete(), describeGlobal(), describeLayout(), describeSObject(), describeSObjects(), describeSoftphoneLayout(), describeTabs(), executeAnonymous(), merge(), process(), query(), retrieve(), search(), undelete(), update(), upsert()
Type: PackageVersion[]
Description: A list of package versions for installed managed packages referenced by your API client.
Specifies a version of an installed managed package. A package version is majorNumber.minorNumber, for example 2.1.
Type: int
Description: The major version number of a package version.
Type: int
Description: The minor version number of a package version.
Type: string
Description: The unique namespace of the managed package.
This sample sets the package version for one installed package in the PackageVersionHeader. Next, it executes the code passed into this method via the executeAnonymous Apex method.