How to get LastModifiedDate of Custom Field or Custom Label by Metadata API in Java?

Edit: I found a link:


and the text there:

"Other standard fields aren't supported, including system fields (such as CreatedById or LastModifiedDate) and autonumber fields.Some standard picklist fields aren’t supported."


So it seems, that my field Memes__c.Flipping_Tables__c.LastModifiedDate will not work.

1 Answer 1


The documentation snippet you refer to is explaining a limitation on which standard fields on an object you can retrieve with the Metadata API. There's a difference between retrieving the metadata for the standard field LastModifiedDate and retrieving the last modified date of some custom field.

However, as far as I'm aware, neither the Metadata API's CustomField entity nor the Tooling API's EntityParticle provides this information.

You can issue queries against the Setup Audit Trail to find a historical snapshot of this kind of change, although it's subject to the limitations of that feature (limited retention; query limitations; based on time rather than a per-field history). For example, you can do

SELECT Section, Display, Action, CreatedBy.Name, CreatedDate 
FROM SetupAuditTrail 
WHERE Action = 'createdCFCustom'

to get back a list of Custom Field creation events during the course of the Audit Trail's retention window. Unfortunately, the information is not structured all that well for machine parsing.

You must log in to answer this question.

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