I have a username / password / token for an org.

That org has uploaded multiple versions of a package; it's the master package org.

Is it possible to issue any API query to determine what the latest version of the package is?

I am asking because I am going to use this version information to install the managed package with: https://www.salesforce.com/us/developer/docs/api_meta/Content/meta_installedpackage.htm

  • The package versions are called AllPackageVersion records and have the 04t keyprefix and the Packages have 033. It doesn't appear to be exposed via the APIs other than as PackageVersion properties on other records, such as ApexClass. In the packaging org you could browse to /04t and create a view. – Daniel Ballinger Nov 19 '14 at 1:18
  • [This link points to the solution which would give version numbers on managed packages][1] [1]: salesforce.stackexchange.com/questions/82143/… – SF Learner Jul 6 '15 at 5:18

I don't think there is a way to get this from the API. However, if you regularly do push upgrades into an org after you cut a production release, you could retrieve the InstalledPackage type from that org. This would tell you the version you most recently pushed into the org.

Here's an example of how I'm currently doing something similar from a shell script using built targets in our CumulusCI build scripts: https://github.com/SalesforceFoundation/CumulusTemplate/blob/master/update_template.sh#L44

  • Yes I do push immediately after upload. I could have an org specifically for this purpose. This is a clever workaround. Of course...if you work at SF, stick a feature request in for this :) – brma Nov 19 '14 at 21:56
  • Find the solution using Metadata API from Apexlink – SF Learner Jul 6 '15 at 5:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.