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...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
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...