AnsweredAssumed Answered

Programatically Setting Modified Date & User

Question asked by simon.white on Mar 23, 2011
Latest reply on May 21, 2013 by rajasacet
Hello all,

I've had a search around the forums and wiki for similar problems, but the discussions I've found tend to be about extracting metadata from files on initial upload to DM, or suitable for one off use, whereas my client's problem is a little different…

Essentially, my client wants to be able  to move wiki pages, documents and entire discussions between sites in share.  They want to do this whilst leaving the metadata of the original documents, including creation date, modification date and modified-by, intact.  They want to do this in the course of normal operation, so meddling directly with the database, taking anything offline etc is out.

I'm pretty confident that I can set the modified-by user correctly - if I need to, I can encapsulate the modification in a RunAsWork although I'm sure I won't have to go that far.  But I was having a little more trouble setting the modification date correctly.

Does anyone know how, via Java or Javascript, to explicitly set the modification date of a node to a date other than _now_?

Many thanks in advance,

Simon White


simon.white@gmail.com
simon.white@surevine.com

Outcomes