4

Is it possible to query fields like CreatedById on a custom metadata type record? Evidently not, but apparently I should be able to?!

SELECT CreatedById from MyObject__mdt   

No such column 'CreatedById' on entity 'MyObject__mdt'

We can see the field on the object and strangely it can even be referenced in a validation rule.

enter image description here

enter image description here

1 Answer 1

1

CreatedById is not available in soap api of custom metadata. Check here:- Custom Metadata Type__mdt

Available fields are:-

  1. Custom Field__c
  2. DeveloperName
  3. isProtected
  4. Label
  5. Language
  6. MasterLabel
  7. NamespacePrefix
  8. QualifiedApiName

As a workaround, You can create a field with default value as current user id.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .