2

I want to query the Created Date of a Custom Metadata Record. I'm trying this:

SELECT Id, DeveloperName, CreatedDate FROM Interest__mdt ORDER BY CreatedDate LIMIT 1

But I'm getting this error:

No such column 'CreatedDate' on entity 'Interest__mdt'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

How can i get the last record? Thanks!

  • Can you Check Tooling Api option in Developer console and try to fetch the created date alone in query? – sanket kumar Mar 21 at 9:37
  • Using Tooling Api show me this: sObject type 'Interest__mdt' is not supported. – Wyrncael Mar 21 at 10:09
4

You have only these standard fields on Custom Metadata record:

  • DeveloperName
  • Id
  • Label
  • Language
  • MasterLabel
  • NamespacePrefix
  • QualifiedApiName

My sugestion is creating a custom field that you can Order by in the way that it is good for you.

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.