We have to validate the field based on last updated date. We have option to get the item updated date. Is there any possible way to check the field updated date?
From what I know, there is no option to get the
Last Update date for Sitecore fields using Sitecore API. The only thing you can get is
updated date for Sitecore items.
But if you have a look at the SQL tables which stores fields (
SharedFields) they do contain
Updated column and it's populated with proper values so you can write your own code to get that dates from SQL database.
I don't know the whole scenario and I don't know how frequently you need to get this data. I would be really careful with calling to the SQL database directly as this may have severe impact on the performance of whichever server you will run this on.
I don't know if you're using any libraries for SQL databases access already so I will not post any code but in general:
- get the connection string for your chosen database
- find the ID of the Field item you're interested in
- find the ID, language and version of your item
- run query to get
[Updated]value from proper fields table (