7

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?

  • 4
    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 (UnversionedFields, VersionedFields, 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. – Marek Musielak Mar 4 '19 at 10:29
  • I think above comment from @MarekMusielak is the answer for your question – scFootsteps Mar 4 '19 at 10:38
5

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 (UnversionedFields, VersionedFields, 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 (UnversionedFields, VersionedFields or SharedFields).
| improve this answer | |

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.