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
Topic author was deleted
Hi,
I'm trying to change the CreateDateTime for a node/document, but it doesn't appear to be having any effect. This is what I'm trying to far:
dynamic node = new DynamicNode(1065); Document n = new Document(node.Id); n.CreateDateTime = node.articlePublishedDate; n.Save(); n.Publish(new umbraco.BusinessLogic.User(0)); umbraco.library.UpdateDocumentCache(n.Id);
Am I going about this in the right way? And also, am I correct in assuming that it can even be changed?
Anyone have any tips? The API seems to suggest the CreateDateTime has get/set, so it should work? Running the code through with breakpoints, it updates the CreateDateTime, but something with the save/publish seems to revert it back?
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Topic author was deleted
Update a node's CreateDateTime in Razor?
Hi,
I'm trying to change the CreateDateTime for a node/document, but it doesn't appear to be having any effect. This is what I'm trying to far:
Am I going about this in the right way? And also, am I correct in assuming that it can even be changed?
Anyone have any tips? The API seems to suggest the CreateDateTime has get/set, so it should work? Running the code through with breakpoints, it updates the CreateDateTime, but something with the save/publish seems to revert it back?
is working on a reply...