London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
Hi,
You could try to use UIDefaultValueForSetChangedOnPublish configuration option. The similar question was on the forum before:
http://world.episerver.com/Modules/Forum/Pages/Thread.aspx?id=88654
http://world.episerver.com/Modules/Forum/Pages/Thread.aspx?id=113298
Hi, but i need a specific date, not the date i publish the page. If i use SetChangedOnPublish then i get the date when the page is publish
I found that in ContentSaveDB the change date and a publish date could be overriden by using UseIChangeTrackingSaved.
But instead of setting Changed property try to set Saved property. The code is below.
var writablePage = page.CreateWritableClone(); writablePage.Saved = theNewDate; EPiServer.BaseLibrary.Context.Current[ContentSaveDB.UseIChangeTrackingSavedKey] = new object(); DataFactory.Instance.Save(writablePage, SaveAction.Publish);
Can i update the changed date by code?
I´m trying like this.