0

Is it possible to get Last modify time for Custom Metadata Record?

I have a Custom metadata type - RR in this Custom metadata type, I have record - test In this record I have a field - fff

My goal is to know when fff was updated last time.

1
  • This is not possible. See my comment against your later question for a way to approximate this.
    – Phil W
    Commented Aug 5, 2021 at 21:44

2 Answers 2

-2

You can get this information from FieldDefinition.

First get the DurableId from Custom Metadata:

SELECT DurableId FROM EntityDefinition WHERE QualifiedApiName = 'CustomMetadataName__mdt'

Then search for the desired fields in FieldDefinition:

SELECT QualifiedApiName, LastModifiedDate FROM FieldDefinition WHERE EntityDefinitionId = '<Mdt_DurableId>'

For more information: https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_fielddefinition.htm

I hope I've helped. See ya!

4
  • Could you pls specify how to get LastModifyDate not when was created custom field on CMD type but when this field was changed on record. Commented Aug 5, 2021 at 18:14
  • I'm confused by this answer. How does this help you know the last modification date for the custom metadata type record and its fields (not the custom metadata type definition)?
    – Phil W
    Commented Aug 5, 2021 at 21:43
  • @PhilW It works but gets Last modify (create time) of the custom field instead of Last modify of record. Commented Aug 5, 2021 at 21:52
  • But that is not what the quest asks for - this is not relevant as an answer.
    – Phil W
    Commented Aug 6, 2021 at 6:08
1

SystemModstamp is now available for Custom Metadata records.

You must log in to answer this question.

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