2

Trying to work on a mm bug (see Issues with managed package visibility?) with the tooling api which involves not sending over the managed package versions in the meta-xml files.

I've read through all the tooling api docs and I can't seem to find anywhere, or elsewhere. Is this just a gap in the tooling api or is there some technique to send along the correct metadata about the managed package versions an apex class should be compiled with?

3

Have you checked the ApexClassMember.Metadata field, which is of type ApexClassMetadata.

The ApexClassMetadata includes a packageVersions element with zero or more occurrences. These are of type PackageVersionMetadata (majorNumber, minorNumber, namespace).


Note: I haven't tried this is practice yet, but all the parts look correct for referencing versions of a managed package.


Here is how it appears in the Tooling API WSDL:

  <xsd:complexType name="ApexClassMetadata">
    <xsd:complexContent mixed="false">
      <xsd:extension base="tns:Metadata">
        <xsd:sequence>
          <xsd:element name="apiVersion" type="xsd:double" />
          <xsd:element minOccurs="0" maxOccurs="unbounded" name="packageVersions" type="tns:PackageVersionMetadata" />
          <xsd:element name="status" type="tns:ApexCodeUnitStatus" />
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  • Right there in front of me. Is the data type for PackageVersionMetadata or ApexClassMetadata described anywhere? Looking at ApexClassMember is just says the type, but I can't seem to find docs for the structure of either of those two ... – Ralph Callaway Jul 12 '14 at 18:57
  • 1
    @Ralph The docs seem to be missing for that Type. I've tried pinging SalesforceDocs to see if they can add it in. – Daniel Ballinger Jul 13 '14 at 21:15

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.