Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm trying to write code which rolls back the older Version of Content. It is executed but it doesn't have any effect. Does anybody know why?
Enumerable<IContent> versions = Services.ContentService.GetVersions(id).Where(n => n.CreateDate < new DateTime(2016, 11, 01)); IContent version = versions.OrderBy(m => m.CreateDate).First(); IContent erg = Services.ContentService.Rollback(id, version.Version); Services.ContentService.SaveAndPublishWithStatus(erg);
Found the problem.
You should use UpdateDate instead of CreateDate
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Rollback
I'm trying to write code which rolls back the older Version of Content. It is executed but it doesn't have any effect. Does anybody know why?
Found the problem.
You should use UpdateDate instead of CreateDate
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.