Is there a way to get version number using SOQL, The below once retrieves only NamespacePrefix, how do i get current version installed..?

SELECT AllowedLicenses,CreatedDate,ExpirationDate,Id,IsProvisioned,LastModifiedDate,NamespacePrefix,Status,SystemModstamp,UsedLicenses FROM PackageLicense
  • You can't do this in SOQL. There are ways to get this data, but we need to know what you're trying to do, since the solution would depend on your intent. – sfdcfox Jul 26 '17 at 14:30
  • I'm using jsforce plugin on nodejs. – Chandu Jul 27 '17 at 5:02

Not doable via sOQL. Using JSForce, you can do a Metadata Retrieve requesting the following members

conn.metadata.retrieve({ apiVersion: '39.0', singlePackage: true, unpackaged: { types: [{ 'members': ['*'], 'name': 'InstalledPackage' }] } })

The response would return all installed packages and and an attribute for their versionNumber

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.