3

In the Summer 14 (v31.0) of the Metadata API complex types are added for CustomMetadata and CustomMetadataValue. The latter appears in the values element of the former. CustomMetadata extends Metadata, as do another 98 other complex types.

What are these new types for and how do I use them?

I can't find them in the documented Metadata types.

Extract from the WSDL:

   <xsd:complexType name="CustomMetadata">
    <xsd:complexContent>
     <xsd:extension base="tns:Metadata">
      <xsd:sequence>
       <xsd:element name="description" minOccurs="0" type="xsd:string"/>
       <xsd:element name="label" minOccurs="0" type="xsd:string"/>
       <xsd:element name="values" minOccurs="0" maxOccurs="unbounded" type="tns:CustomMetadataValue"/>
      </xsd:sequence>
     </xsd:extension>
    </xsd:complexContent>
   </xsd:complexType>
   <xsd:complexType name="CustomMetadataValue">
    <xsd:sequence>
     <xsd:element name="field" type="xsd:string"/>
     <xsd:element name="value" type="xsd:anyType"/>
    </xsd:sequence>
   </xsd:complexType>
1

These types are related to a closed pilot feature yet to be announced by Salesforce, i noticed them myself when upgrading the Apex Metadata API, not sure why they have leaked out tbh. I am not allowed to go into any detail here, suffice to say its going to be amazing! Sorry to tease.

  • Interesting. I only noticed them because of the anyType on CustomMetadataValue and the implication that has for using it from Apex. I'd speculate that we will be able to add out own metadata values to the system. Maybe at the record level rather than the type level. I guess we will just have to wait and see! – Daniel Ballinger Aug 21 '14 at 19:22
  • Yeah, i noticed that when updating the Apex Metadata API, as the WSDL to Apex tool didn't like it. May have to get inventive to support it via Apex MD once the feature is released! ;-) – Andrew Fawcett Aug 22 '14 at 9:27
  • 1
    Browsing through the Salesforce sessions I found "Build Your Own Platform on Force.com". The description for that session implies a new feature that can be packaged. It might be related. I guess you can neither confirm nor deny anything :) – Daniel Ballinger Sep 8 '14 at 21:30
  • So these are the definition of External Objects for lightning connect in Winter 15 then? – Daniel Ballinger Oct 13 '14 at 17:38
  • Yes indeed, the secret is out, amazing technology! – Andrew Fawcett Oct 15 '14 at 13:49

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.